selenium-webdriver Selecting by multiple criteria [C#]


Example

It's also possible to use selectors together. This is done by using the OpenQA.Selenium.Support.PageObjects.ByChained object:

element  = driver.FindElement(new ByChained(By.TagName("input"), By.ClassName("class"));

Any number of Bys can be chained and are used as an AND type selection (i.e. all Bys are matched)