Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99415

Not able to click on a input type submit button using Selenium Python

$
0
0

html confirmar button

Not sure about why, but maybe it is something like JS or hidden element.

I need to click on "Confirmar" button, but for some reason its not clickable.

This button is into a diferent "block" then the others that I fill in the form.

this the html of this button

<input type="submit" name="ctl00$WpModaisCrm1$ctl03$btnRegistrarProtocolo" value="Confirmar" id="btnRegistrarProtocolo" class="btn btn-primary pull-right" autocomplete="off">

the "Cancelar" button html is:

<input type="submit" name="ctl00$WpModaisCrm1$ctl03$btnCancelarProtocolo" value="Cancelar" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$WpModaisCrm1$ctl03$btnCancelarProtocolo&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_WpModaisCrm1_ctl03_btnCancelarProtocolo" class="btn btn-primary button-padding" data-dismiss="modal" autocomplete="off">

and there is an hidden element with this HTML

<input type="submit" name="ctl00$WpModaisCrm1$ctl03$btnCarregarUcProtocoloAtendimento" value="" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$WpModaisCrm1$ctl03$btnCarregarUcProtocoloAtendimento&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnCarregarUcProtocoloAtendimento" style="display: none" autocomplete="off">

HTML

Form

code:

confirmar = driver.find_element_by_id("btnRegistrarProtocolo")
print(confirmar.is_enabled()) # return True

print(confirmar.is_displayed()) # return True
print(confirmar.is_selected()) # return False

confirmar.submit() # doesn't work
confirmar.click() # doesn't work

click() and submit() does nothing...


Viewing all articles
Browse latest Browse all 99415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>