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"> </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
Post a Comment