Selenium / Python - Selecting via css selector -


issue:

can not select css selector specific element. need verify registered user can change password successfully. have tried different attributes of class call it. result exception error in method when trying first 2 examples. final try calls first class instance , resets password fields (fail).

tried:

driver.find_element_by_css_selector("value.update").click() driver.find_element_by_css_selector("type.submit").click() driver.find_element_by_css_selector("input.test_button4").click() 

objective:

i need select items share same class. can see below, class shared.

form id="changepw_form" name="changepw" action="#" method="post"> <div class="field3"> <div class="field3"> <div class="field3"> <input class="test_button4" type="reset" value="reset" style"font-size:21px"=""> <input class="test_button4" type="submit" value="update" style"font-size:21px"=""> 

driver.find_element_by_css_selector(".test_button4[value='update']").click() 

edit: because selector needs class, id, or tagname, value.update none of these.

.test_button4 provides classname match against, , there, [value='update'] specifies particular match(es) select.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -