mercredi 29 juillet 2020

Python Selenium input check click failed

I have following html:

<input id="!T1319457706_SPY" type="checkbox" name="!T1319457706_SPY" class="checkbox" onclick="toggleTextField(['1319457706'],this.checked,'','');" style="">

This is checkbox that I want to click,I have tried all the selector to locate it,but all failed and system have no error message,in this page I have tried to click other element,it works,expect this checkbox.

I have tried follow ways:

driver.find_element_by_id('!T1319457706_SPY').click()
driver.find_element_by_css_selector("input[name='!T1319457706_SPY']").click()
driver.find_element_by_xpath("//body[@class='grdtradeOrder']//form[@name='displayopenorders']//table[@class='t0']//tr[@name='orderid1319457706']//input[@name='!T1319457706_SPY']").click()

I also tried use:

 click_check=driver.find_element_by_id('!T1319457706_SPY')

 driver.execute_script("arguments[0].click();", click_check)

All above tries have failed.Any friend can help?




Aucun commentaire:

Enregistrer un commentaire