Selenium: Select by CSS Seelctor -


i trying click submit button on whitepages.com.

i tried:

div//buttom.submit.btn.btn-primary.inser.expandable")).submit();; 

i tried:

div//buttom.submit.btn.btn-primary.inser.expandable")).submit();; 

and:

buttom.submit.btn.btn-primary.inser.expandable")).click(); 

none of above code worked. doing wrong ?

thanks

it seems though you're using mix of xpath , css selectors.

to select "search" button use css selector:

button.submit 

or if want use classes (i wouldn't recommend it):

button.submit.btn-btn-primary.inset.expandable 

tip: if you're having trouble finding correct css selector open console (in chrome press f12). whitepages has jquery loaded if type in:

$('button.submit') 

you notice element indeed present.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -