Tuesday, July 7, 2015

C# Selenium - attribute selectors-single & multiple

We can also select certain elements that have certain attribute values.
Syntax: css=Tagname[Att=Value@Att]
Ex: 
<input type="text" class="europe asia africa" value="Continent" />

driver.FindElement(By.CssSelector("input[value=Continent]"))

We can also select elements with multiple attribute values.
Syntax: css=Tagname[Att=Value@Att][Att1=Value@Att1]

<input type="text" class="europe asia africa" value="Continent" />

driver.FindElement(By.CssSelector("input[value=Continent][type=text]))

1 comment:

  1. your way of design a logo of schools is simply awesome, cool and very much impressive. give me some simple notes to design like this pictures and what kind of tool/software is fine for work for designing because of i am one of starter for this field.
    SAT training centre in chennai

    ReplyDelete