Created
March 13, 2015 16:26
-
-
Save johnmmoss/734ab75cec857895b0b5 to your computer and use it in GitHub Desktop.
Selenium API Selecting a Button in a html column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Click the a link of the tr where a td has a value of "Leeds", and the a link has the text "Edit" | |
var name = "Leeds"; | |
var xpath = string.Format("//tr[td[normalize-space(text())='{0}']]/td/a[normalize-space(text()) = \"Edit\"]", name); | |
var editLink = webDriver.FindElement(By.XPath(xpath)); | |
editLink.Click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment