提问人:AnOldSoul 提问时间:7/20/2017 最后编辑:AnOldSoul 更新时间:7/20/2017 访问量:588
从 Windows 7 运行 Codeception 时出现 Web 驱动程序错误
Web driver error when running Codeception from Windows 7
问:
我正在 Windows 7 机器上运行我的 codeception 验收测试,这导致了下面提到的问题。
Signature: somethingSearchCept
Test: tests\acceptance\test\tstCases_somethingSearch\somethingSearchCept.php
Scenario --
WebDriver::debugWebDriverLogs method has been called when webDriver is not set
WebDriver::_saveScreenshot method has been called when webDriver is not set
WebDriver::_savePageSource method has been called when webDriver is not set
Screenshot and page source were saved into 'D:\Training\codeception\tests/_out
put\' dir
ERROR
/
Codeception\Test\Cept: test
I am on page "/"
[GET] https://www.google.com/
PHP Fatal error: Call to a member function get() on null in phar://D:/Training/
codeception/codecept.phar/src/Codeception/Module/WebDriver.php on line 729
Fatal error: Call to a member function get() on null in phar://D:/Training/codec
eption/codecept.phar/src/Codeception/Module/WebDriver.php on line 729
FATAL ERROR. TESTS NOT FINISHED.
Call to a member function get() on null
in phar://D:/Training/codeception/codecept.phar/src/Codeception/Module/WebDriver
.php:729
this is the error on debug mode
当我从 Windows 10 机器上运行它时,它运行良好并执行验收测试。下面是我拥有的配置yml。
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: false
memory_limit: 1024M
extensions:
enabled:
- Codeception\Extension\RunFailed
我使用的 Selenium Web 驱动程序版本是 3.4.0。PHP 版本为 5.6。我已经下载了最新的 chrome 驱动程序版本 2.30。我在这里做错了什么?任何帮助将不胜感激。
acceptance.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.
class_name: AcceptanceTester
modules:
enabled:
- WebDriver:
url: https://www.google.com/
browser: 'chrome'
- \Helper\Acceptance
答: 暂无答案
评论
acceptance.suite.yml
modules.enabled.WebDriver.url
https
http://localhost/