Hi,
i run
// Example 2: background colour, element found with CSS
$bar = $I->executeInSelenium(function(\WebDriver $webdriver) {
return $webdriver->findElement(WebDriverBy::cssSelector('h3'))->getCSSValue('background-color');
});
And got this error
[PHPUnit_Framework_Exception] Argument 1 passed to Codeception\TestCase\Cept::{closure}() must be an instance of WebDriver, instance of Facebook\WebDriver\Remote\RemoteWebDriver given, called in /pathtoproject/vendor/codeception/codeception/src/Codeception/Module/WebDriver.php on line 1651 and defined
Fixed it with rollback on 2.1.0
Hope that helps. Stay strong good work ;)
Just replace
function(\WebDriver $webdriver) {
with
function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver)
Thx
Thanks!! :)
Most helpful comment
Just replace
with