如何解决密码:Webdriver ChromeOptions配置可使用Selenium
`我将Codeception作为测试框架,并试图添加一个测试,该测试将使用Selenium和使用ChromeOptions的WebDriver模块一起单击Selenium。
我正在accept.suite.yml中使用此配置:
# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PHPbrowser.
# If you need both WebDriver and PHPbrowser tests - create a separate suite.
actor: AcceptanceTester
modules:
enabled:
- Asserts
# Commented these out as they should not work with WebDriver enabled
# - PHPbrowser:
# # module configuration
# url: blah.blah
- Symfony:
app_path: 'src'
environment: 'test'
em_service: 'doctrine.orm.entity_manager'
rebootable_client: true
part: SERVICES
- Doctrine2:
depends: Symfony
cleanup: true
# WebDriver is incompatible with the Symfony Module - Symfony module is needed for Foundry to be loaded
- WebDriver:
# URL the webdriver uses to access the running application
url: 'http://127.0.0.1:80'
browser: 'chrome'
# Host & port of the webdriver instance
host: 127.0.0.1
port: 4444
restart: true
chromeOptions:
- detach: false
- window-size: 1920,1090
- prefs:
- profile.default_content_settings.popups: 0
- download.default_directory: "/srv/cadence/tests/_output"
- browser.helperApps.neverAsk.savetodisk: "application/vnd.ms-excel"
- \Helper\Acceptance
/srv/cadence/tests/_output
是项目中写入其他测试输出的文件夹的完整路径,但是,如果我在测试运行后将其装入容器中,则那里没有文件。
我认为问题可能出在首选项上,但并不完全确定。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。