【发布时间】:2019-04-16 08:39:09
【问题描述】:
我有这段代码:
getText: (selector) => {
browser.waitUntil(function () {
return browser.isExisting(selector) === true;
},timeout,
'Could not find element after: ' + timeout,
pollingTime);
return browser.getText(selector);
}
有时这个函数(getText(selector),但在深层浏览器中。getText(selector))为看起来像这样的选择器返回undefined:
article[data-product-id="test-00020"] li.product-entry__summary__item.is-price span
并非每次运行测试时都会发生这种情况,但偶尔会发生。这让我发疯,因为行为不一致。有时有效,有时无效。
有没有人有类似的问题?请帮忙!谢谢。
【问题讨论】:
标签: webdriver-io