【发布时间】:2021-08-10 14:57:32
【问题描述】:
我有一个场景,点击链接后会打开一个新页面,然后我需要在加载的新页面上工作。 使用 switchPage 我可以导航到该页面,但它没有识别新页面上的元素,而是在打开的第一页中搜索元素。
我无法找到解决此问题的方法。有人可以帮忙吗?
Scenario: Title of your scenario
Given driver baseUrl
And waitFor("input[name='username']")
And input("input[name='username']",username)
And input("input[type='password']",password)
When click("input[name='Login']")
And waitFor("a[title='Setup']")
When click("a[title='Setup']")
* delay(2000)
When switchPage(1)
And waitFor("input[class='filter-box input']")
【问题讨论】:
标签: automation ui-automation karate