Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium select element with multiple attributes

Tags:

selenium

How do I select a div using both it's id and class in Selenium firefox addon?

EDIT: I managed to solve it, I used an xpath expression with both the attributes @id= and @class =

like image 370
Rnet Avatar asked Aug 02 '13 22:08

Rnet


1 Answers

I stumbled upon this question and thought I would leave an example of the answer that the OP didn't leave (as requested by vincebowdren above):

//*/fieldset[@class="openable"][@id="activityFieldset"]

This would select a fieldset element with the openeable class and activityFieldset id.

like image 54
jjj Avatar answered Oct 01 '22 12:10

jjj