codeception ElementNotVisibleException

问题描述 投票:0回答:1

我正在使用selenium和Chrome Driver来运行代码验收测试。但是,我的测试脚本无法单击网站上的按钮,在我的命令提示符下显示此错误消息:[Facebook \ WebDriver \ Exception \ ElementNotVisibleException]元素不可见。该按钮在浏览器上清晰可见,我尝试使用JQuery:

$I->executeJS('jQuery("#edit-submit").show()');

edit-submit是我要点击的按钮的ID。它仍然无法正常工作。

selenium-chromedriver codeception codeceptjs
1个回答
0
投票

您可以在$ I-> executeJS('jQuery(“#edit-submit”)。show()')之前使用$ I-> scrollTo(“#edit-submit”)命令

© www.soinside.com 2019 - 2024. All rights reserved.