【发布时间】:2020-05-26 05:10:00
【问题描述】:
我在使用 codeceptjs 进行测试时遇到问题。我正在尝试在 Atlassian 云上测试应用程序,但 codeceptjs/puppeteer 无法与页面上的任何元素进行交互。当我启用屏幕截图时,我看到它在正确的页面上,但 codeceptjs 只能在导航菜单中找到元素。它甚至无法通过选择器或 xpath 找到正文元素。
我尝试添加I.waitForNavigation(),但测试从未超过该步骤。正如他们在文档here 中所说的那样,我尝试在配置部分设置超时,但我没有运气。我尝试了他们建议的一切,但它只是永远等在那里。如果我注释掉 I.waitForNavigation() 它将失败,因为它找不到 Boyd 元素。我使用的是在目录中安装 codeceptjs 时创建的默认配置文件。这是我要测试的代码,但它会导致各种问题。
I.amOnPage('https://artemis-test2.atlassian.net/wiki/plugins/servlet/ac/com.nurago.confluence.plugins.treecopy/copy-page-tree-confluence?page.id=25821196&space.key=TEST1');
I.waitForNavigation();
// if I don't comment this out it will wait here forever
I.wait(4);
I.waitForElement('.ap-iframe');
// it can find the iframe for some reason but nothing else
I.waitForElement('.body');
// if I do comment it out it fails here because it says there is no body element. can't find it by xpath either.
我不知道为什么会这样。非常感谢任何帮助。
【问题讨论】:
标签: automated-tests qa codeceptjs