Created
February 5, 2017 13:00
Star
You must be signed in to star a gist
This file contains 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
this.driver.FindElement(By.ClassName("className")); | |
this.driver.FindElement(By.CssSelector("css")); | |
this.driver.FindElement(By.Id("id")); | |
this.driver.FindElement(By.LinkText("text")); | |
this.driver.FindElement(By.Name("name")); | |
this.driver.FindElement(By.PartialLinkText("pText")); | |
this.driver.FindElement(By.TagName("input")); | |
this.driver.FindElement(By.XPath("//*[@id='editor']")); | |
// Find multiple elements | |
IReadOnlyCollection<IWebElement> anchors = this.driver.FindElements(By.TagName("a")); | |
// Search for an element inside another | |
var div = this.driver.FindElement(By.TagName("div")).FindElement(By.TagName("a")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment