Reputation: 39
I am using xpath to click on edit button , but i dont know where the webtable starts so i can click on the webelement. Below is the link for WebTable.
http://demo.automationtesting.in/WebTable.html
Thanks in Advance.
Upvotes: 1
Views: 303
Reputation: 7708
If you want some specific selection e.g. want to edit info of particular user Then you can use below xpath where you have to changes email address only it will click on the edit icon of that particular record .
//div[text()='[email protected]']/../following-sibling::div//div[@class='avddbl']/button[contains(@class,'btn')]
Upvotes: 1
Reputation: 5637
Try this:
// gets the first edit button
WebElement Edit_btn= driver.findElements(By.xpath("//div[@class = 'avddbl']/button")).get(0);
Actions action = new Actions(driver).doubleClick(Edit_btn);
action.build().perform();
Upvotes: 1