[英]Not able to navigate to the page after clicking button
I'm not able to navigate to a different page after clicking on the button.单击按钮后,我无法导航到其他页面。
My Script tells it is clicking on the button and the script is pass even though on UI it doesn't navigate to the different page and remains on the same page.我的脚本告诉它正在单击按钮并且脚本通过,即使在 UI 上它没有导航到不同的页面并保持在同一页面上。
Below is my code下面是我的代码
Navigate to Inspection Services
click element ${link_inspectionservices}
wait until element is visible ${link_homeinspection}
set browser implicit wait 10
wait until element is visible ${link_homeinspection}
click element ${link_homeinspection}
this script is a pass.这个脚本是通行证。 But actually, it is not navigating to the home inspection page.但实际上,它并没有导航到主页检查页面。
I don't know which UI framework you are testing.我不知道您正在测试哪个 UI 框架。 In some javascript frameworks the normal "Click element" KW doesn't work always.在一些 javascript 框架中,正常的“点击元素”KW 并不总是有效。
Try this one:试试这个:
wait until element is visible ${link_homeinspection}
set browser implicit wait 10
wait until element is visible ${link_homeinspection}
${elem} Get WebElement ${link_homeinspection}
Execute Javascript arguments[0].click(); ARGUMENTS ${elem}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.