c# - Selenium not Clicking Link -


i want reset modem selenium. facing problem. trying click no click operation has been done. modem click zyxel.

<li style="cursor: pointer;" class="subitem" id="maintenance-reboot"><span class="arrow">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><a>reboot</a></li> 

i tried

driver.findelement(by.linktext("reboot")).click(); 

i tried id "maintenance-reboot" nothing work me.

then try go directly link.

http://192.168.1.1/pages/maintenance/reboot/reboot.html 

page came no frame reboot page , clicked button nothing change. think mainframe required reboot.

try 3 things:

driver.findelement(by.xpath(".//li[@id='maintenance-reboot']/a")).click(); 

or

driver.findelement(by.xpath(".//a[contains(text(),'reboot')]/..")).click(); 

or

driver.findelement(by.xpath(".//a[contains(text(),'reboot')]/../..")).click(); 

one of them must work you


alter solution: go page , execute javascript "btnreset();"

((javascriptexecutor) driver).executescript("btnreset();"); 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -