【发布时间】:2020-11-20 17:38:49
【问题描述】:
我正在运行 Codeception 测试。出于显示目的,我想在单个 Chrome 浏览器 [或 FF idc] 上驱动测试,并在测试运行之间保持浏览器打开。我知道有办法做到这一点[我做到了,但忘了怎么做!]。
我正在跑步: Ubuntu 20 谷歌浏览器 86
目前,测试运行良好,GUI 弹出,但在运行结束时关闭。
我认为这与参数“browserSessionReuse”或“restart”或“detach”有关,但我不知道该放在哪里,尤其是在 PHP 中!
我怎样才能只使用一个浏览器并继续使用它,它是 Codeception?
yml:
class_name: AcceptanceTester
modules:
enabled:
- \Helper\Acceptance
- WebDriver
config:
WebDriver:
url: 'http://xx123xxx.com/'
port: 4444
browser: chrome
我如何启动 Selenium:
java -Dwebdriver.chrome.driver=/var/www/html/wp-content/plugins/WPbdd/chromedriver -jar selenium.jar
【问题讨论】:
-
有人在 Python 中做过,而不是在 PHP 中。 stackoverflow.com/questions/49764902/…
标签: selenium selenium-webdriver selenium-chromedriver codeception