Cucumber test with rails 4 throws error: element is not attached to the page document
Cucumber test with rails 4 throws error: element is not attached to the page document
bundle exec cucumber features/products.feature
使用此命令,我正在 运行我的黄瓜产品功能测试
对于所有场景,但在一个场景执行后会抛出错误
Given I am an authenticated user #features/step_definitions/login.rb:37
stale element reference: element is not attached to the page document
(Session info: chrome=46.0.2490.80)
(Driver info: chromedriver=2.13.307650 (feffe1dd547ee7b5c16d38784cd0cd679dfd7850),platform=Mac OS X 10.8.5 x86_64) (Selenium::WebDriver::Error::StaleElementReferenceError)
用于身份验证。但是,如果我 运行 一个一个地进行,它就会成功。请任何帮助如何 运行 所有场景同时出现异常。
如果您在页面上查找尚未加载或因 dom 已在上一步中更改而过期的元素,则会出现此错误。确保当你 运行 将你的测试用例作为散装时,每个用例都应该与其他用例隔离。如果没有添加额外的步骤以确保它加载到那里,您应该检查您要交互的元素是否在页面上。
bundle exec cucumber features/products.feature
使用此命令,我正在 运行我的黄瓜产品功能测试 对于所有场景,但在一个场景执行后会抛出错误
Given I am an authenticated user #features/step_definitions/login.rb:37
stale element reference: element is not attached to the page document
(Session info: chrome=46.0.2490.80)
(Driver info: chromedriver=2.13.307650 (feffe1dd547ee7b5c16d38784cd0cd679dfd7850),platform=Mac OS X 10.8.5 x86_64) (Selenium::WebDriver::Error::StaleElementReferenceError)
用于身份验证。但是,如果我 运行 一个一个地进行,它就会成功。请任何帮助如何 运行 所有场景同时出现异常。
如果您在页面上查找尚未加载或因 dom 已在上一步中更改而过期的元素,则会出现此错误。确保当你 运行 将你的测试用例作为散装时,每个用例都应该与其他用例隔离。如果没有添加额外的步骤以确保它加载到那里,您应该检查您要交互的元素是否在页面上。