Selenium 2 with Java : copy paste issue -


i'm working on selenium webdriver develop test project webapp using java (junit4). want copy row values webtable , paste them in other row of same table. have tried following code didn't work:

actions duplicatebuilder= new actions(driver);  webelement s1= driver.findelement(by.xpath("//div[@id='griddonnee']/div[2]/table/tbody/tr[2]/td"));   action clicks1= duplicatebuilder.click(s1).build();  clicks1.perform();  webelement copyrow= driver.findelement(by.xpath("//div[@id='griddonnee']/div[2]/table/tbody/tr[2]"));  action copys1= duplicatebuilder.sendkeys(copyrow,keys.left_control+ "c").build();   copys1.perform();  webelement s4= driver.findelement(by.xpath("//div[@id='griddonnee']/div[2]/table/tbody/tr[5]/td"));   action clicks4= duplicatebuilder.click(s4).build();  clicks4.perform();  action pastes1= duplicatebuilder.sendkeys(copyrow,keys.left_control+ "v").build();   pastes1.perform(); 

ps: don't want go js option solution. please, knows better way or proposes modifications in code make work ? ! best regards


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -