selenium - Custom x-path, select dropdown menu using class label -


i'm trying test https://matrix.itasoftware.com/ want write custom xpath using label not using firepath.

select s=new select(driver.findelement(by.xpath("id(//label[text() = 'adults']/@for)"))); s.selectbyvalue("4");  

please suggest better way.

https://matrix.itasoftware.com/

//label[contains(.,'adults')]  or   //span[contains(.,'18 61 years')] 

can me how click on drop-menu , select number


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -