jeudi 6 août 2015

Get text associated with check box in selenium where html code does not have value or name property

I have a Radcombobox in my application which has several check boxes in the combo box. What I wish to do is to fetch the text associated with the check box. I searched on internet and came to know that text can be fetched from name or value property in HTML code, but problem is that my HTML code does not have such properties. HTML code:

input class="rcbCheckAllItemsCheckBox" type="checkbox"
Check All

What i wish to do is to fetch value "Check All". Using code x = driver.findElement(By.xpath("/html/body/form/div[1]/div/div/div/input")).getText();, value returned is blank.




Aucun commentaire:

Enregistrer un commentaire