OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Click on a buttong that is input type on a web page

  • Thread starter Thread starter Maxime Bouhadana
  • Start date Start date
M

Maxime Bouhadana

Guest
I would like to click on a button that has no button attribute in the inspect console. Here is the element I would like to click on :

Code:
<input name="play" id="play_id" type="submit" class="bouton" value="value_id">

Here is what I've tried :

Code:
play_btn = driver.find_element("id", "play_id")
play_btn.click()

Code:
play_btn = WebDriverWait(driver, 40).until(
        EC.element_to_be_clickable(("xpath", '//input[@name="play"]'))
    )

Code:
# Click on (x, y) coords
actions = ActionChains(driver)
actions.move_by_offset(x_coord, y_coord).click().perform()

Nothing seems to be working and I am a bit confused :/

Thanks for the help !
<p>I would like to click on a button that has no button attribute in the inspect console. Here is the element I would like to click on :</p>
<pre class="lang-html prettyprint-override"><code><input name="play" id="play_id" type="submit" class="bouton" value="value_id">
</code></pre>
<p>Here is what I've tried :</p>
<pre class="lang-py prettyprint-override"><code>play_btn = driver.find_element("id", "play_id")
play_btn.click()
</code></pre>
<pre class="lang-py prettyprint-override"><code>play_btn = WebDriverWait(driver, 40).until(
EC.element_to_be_clickable(("xpath", '//input[@name="play"]'))
)
</code></pre>
<pre class="lang-py prettyprint-override"><code># Click on (x, y) coords
actions = ActionChains(driver)
actions.move_by_offset(x_coord, y_coord).click().perform()
</code></pre>
<p>Nothing seems to be working and I am a bit confused :/</p>
<p>Thanks for the help !</p>
 
Top