没有找到与幻影和恶作剧无头的元素

时间:2014-12-17 16:26:26

标签: cucumber phantomjs poltergeist

当我使用selenium在浏览器中运行这段代码时,它可以正常工作

find(:css, '*[data-id="claim_email"]').set "gmelville@constantcontact.com"
find(:css, '*[data-id="claim_link"]').click

但是,当我尝试在phantomjs上使用poltergeist运行相同的东西时,我得到一个错误说明

Unable to find css "*[data-id=\"claim_email\"]" (Capybara::ElementNotFound).

这可能是什么问题?在无头运行时查看呈现的页面,它确实有元素。

我也正在使用黄瓜进行这些测试

0 个答案:

没有答案