简体   繁体   English

单击按钮后无法导航到页面

[英]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.

相关问题 单击提交按钮 django 后无法重定向到另一个页面 - Not able to redirect to another page after clicking on submit button django 如何导航页面单击下一步按钮的页面? - How I can navigate page a page clicking next button? 单击链接后,PhantomJS无法导航到下一页 - PhantomJS does not navigate to the next page after clicking a link 硒:如何在单击按钮后获取页面源代码 - selenium: How to get page source code after clicking a button Python driver.get_page_source 点击按钮后 - Python driver.get_page_source after clicking the button 得到确认页面后点击浏览器返回按钮 - Clicking the browser back button after getting the confirmation page 无法使用 Django 视图导航到不同的页面 - Not able to navigate to a different page using django views Scrapy-无法导航到下一页 - Scrapy- not able to navigate to next page 使用 Selenium (Python) 导航到分页中的第 n 页而不单击每一页? - Navigate to nth page in pagination with Selenium (Python) without clicking on every page? 单击单选按钮时出现问题无法 select 单选按钮。 消息:过时的元素参考:元素未附加到页面文档 - problem in clicking radio button can't able to select a radio button. Message: stale element reference: element is not attached to the page document
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM