我正在 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 网络驱动程序版本是 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