0

I am running my codeception acceptance test in a Windows 7 machine which is causing the below mentioned issue.

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

When I run it from a Windows 10 machine, it runs fine and executes the acceptance tests. Below is the configuration yml I am having.

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

The Selenium web driver version I am using is 3.4.0. PHP version is 5.6. I have downloaded the latest chrome driver version 2.30. What am I doing wrong here? Any help would be much appreciated.

Content of acceptance.suite.yml is as follows.

# 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
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
  • Please add content of `acceptance.suite.yml`. Are you using the latest version of Codeception? – Naktibalda Jul 20 '17 at 09:11
  • I have edited the question with the content. Yes I downloaded the latest codecept.phar file from the site – AnOldSoul Jul 20 '17 at 10:39
  • The url for `modules.enabled.WebDriver.url` has to be a local domain, often also used without `https` like `http://localhost/`. So it never has to be obfuscated and is never reachable for anyone, – David Oct 15 '22 at 11:46

0 Answers0