OS: Windows 8.1
OS Version: 6.3
Java Version: 1.8.0_171
Selenium Version: 3.12.0
Browser: Internet Explorer
Browser Version: 11.0.9600.19003
Executables used: IEDriverServer 3.12.0 (32-bits and 64bits)
When i try execute codecept i get the following error:
c:\codeception\vendor\bin>codecept run --env ie
Codeception PHP Testing Framework v2.4.1
Powered by PHPUnit 7.1.4 by Sebastian Bergmann and contributors.
←[1mAcceptance (ie) Tests (1) ←[22m---------------------------------------------
---------
←[31;1mE←[39;22m ←[35;1mFirstCest:←[39;22m Frontpage works
--------------------------------------------------------------------------------
←[1mUnit Tests (0) ←[22m--------------------------------------------------------
---------
--------------------------------------------------------------------------------
Time: 194 ms, Memory: 10.00MB
There was 1 error:
---------
1) ←[35;1mFirstCest:←[39;22m Frontpage works
←[37;41;1m Test ←[39;49;22m tests\acceptance\FirstCest.php:frontpageWorks
←[37;41;1m
←[39;49;22m
←[37;41;1m [Facebook\WebDriver\Exception\SessionNotCreatedException] Unable to
create session from org.openqa.selenium.remote.NewSessionPayload@332e93a5
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:08.9
36Z'
System info: host: 'LPT-FA3423', ip: '192.168.105.108', os.name: 'Windows 8.1',
os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_171'
Driver info: driver.version: unknown ←[39;49;22m
←[37;41;1m
←[39;49;22m
#1 C:\codeception\vendor\facebook\webdriver\lib\Exception\WebDriverException.ph
p:154
#2 C:\codeception\vendor\facebook\webdriver\lib\Remote\HttpCommandExecutor.php:
320
#3 C:\codeception\vendor\facebook\webdriver\lib\Remote\RemoteWebDriver.php:126
#4 C:\codeception\vendor\symfony\event-dispatcher\EventDispatcher.php:212
#5 C:\codeception\vendor\symfony\event-dispatcher\EventDispatcher.php:44
←[37;41mERRORS!←[0m
←[37;41mTests: 1←[0m←[37;41m, Assertions: 0←[0m←[37;41m, Errors: 1←[0m←[37;41m.←
[0m
c:\codeception\vendor\bin\tests>java -jar "selenium-server-standalone-3.12.0.jar"c:\codeception\vendor\bin\tests>IEDriverServerX64.exec:\codeception\vendor\bin\tests>IEDriverServerX64.exec:\codeception\vendor\bin>codecept run --env ieacceptance.suite.yml
class_name: AcceptanceTester
env:
chrome:
modules:
enabled:
- WebDriver
config:
WebDriver:
url: 'https://localhost/'
browser: chrome
port: 5555
firefox:
modules:
enabled:
- WebDriver
config:
WebDriver:
url: 'https://localhost/'
browser: firefox
port: 5555
ignoreSslErrors: true
sslProtocol: any
debug: true
ie:
modules:
enabled:
- WebDriver
config:
WebDriver:
url: 'https://localhost/'
browser: iexplore
port: 4444
Please report this issue to Codeception project
Who is right?
https://github.com/Codeception/Codeception/issues/4967#issuecomment-388467030
@PeterJason That depends on the answer to this question: What is the JSON payload being sent across the wire to the remote server?
The protocol used by remote ends that conform to the W3C WebDriver Specification (like the IE driver) is quite different in the description of a new session. Projects that handle their own communication with remote ends (in other words, those that do not rely on the Selenium project language bindings to form the commands for them) need to make sure they’re sending compliant JSON across the wire.
I don’t know anything about Codeception, but at first glance, it looks like a PHP-based framework. The Selenium project does not provide PHP language bindings, so the component that handles the communication between your PHP WebDriver code and the remote end (Java remote server, IEDriverServer.exe, geckodriver, chromedriver, etc.) needs to be aware of the protocol differences. I don’t know if that component is Codeception itself, or if it’s a PHP language binding provided by another project (the Facebook PHP bindings seem very popular), but that component needs to be sending the proper data. It’s unclear if that’s happening.
Yes, if you think it's a remote end issue (that's "selenium itself") please provide the content of the new session request that you think is valid, but selenium does not respond properly to this request.
The problem was solved this line:
java -Dwebdriver.ie.driver=C:\codeception\vendor\bin\tests\IEDriverServerX64.exe -jar "selenium-server.jar"
@PeterJason Thank you. I had the same issue... Do you understand why it can happend? Because I had been using this line "java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-3.12.0.jar" about 1 month and now it get an error from Codecept.... As I understand this is some issue with Selenium versions.
How should the output of selenium-standalone-server look like when it is started and the IEDriver loaded?
We use https://github.com/ScoopInstaller/Main/blob/master/bucket/ie11webdriver.json but the changelog lists newer releases https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG
Most helpful comment
The problem was solved this line:
java -Dwebdriver.ie.driver=C:\codeception\vendor\bin\tests\IEDriverServerX64.exe -jar "selenium-server.jar"