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

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -