python - Selenium webdriver send_keys() not working properly -


i using selenium web driver automate front end web ui actions in python script. in regard input value text filed (mandatory field), driver.find_element_by_xpath(<xpath>).send_keys(<value>) code used.

though able see value has been typed in concerned text field, error message saying text box cannot empty being thrown on ui.

browser : 23.0 (also tried old version 20.0, 16.0 reproduces same issue) python version : 2.7

here code:

sel = webdriver.firefox() sel.find_element_by_xpath("//input[@name='minbid']")'.send_keys("2")  sel.find_element_by_xpath("//div[text()='save']") 

upon running snippet, ui complaints saying min bid not supplied.

please solve challenge. thank you.

try clicking on field before input;

sel.find_element_by_xpath("//input[@name='minbid']")'.click sel.find_element_by_xpath("//input[@name='minbid']")'.send_keys("2")  

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -