Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submit button not working in Selenium webdriver

When I launch ChromeDriver or IEDriver and click the submit button (manually and automatically), it does not send the inputs. It works outside of webdriver though, I can click the submit button and send the inputs but in webdriver, it doesn't seem do anything. Is this something wrong with webdriver?

Thanks.

Note: The selenium version is the latest 2.47.0 along with chrome and chromedriver. I can't provide the link to the webpage since its a private server. Here is the code for the button

<span id="button-1429-btnInnerEl" class="x-btn-inner x-btn-inner-center" unselectable="on">Submit All</span>
like image 525
ihossain Avatar asked Nov 15 '25 17:11

ihossain


2 Answers

Having the same issue. Using element.sendKeys(Keys.ENTER) solves it for me.

like image 160
danielepolencic Avatar answered Nov 17 '25 06:11

danielepolencic


It will solve, Here I'm using python language. First, you need to import Keys and the following code will help you.

from selenium.webdriver.common.keys import Keys
login_btn=driver.find_element_by_id('button-1429-btnInnerEl').send_keys(Keys.ENTER)
like image 44
Jaffar Ahamed Avatar answered Nov 17 '25 07:11

Jaffar Ahamed