Behat + Selenium + GeckoDriver - Unable to proceed with test

93 views
Skip to first unread message

Phil

unread,
Nov 27, 2018, 11:08:46 PM11/27/18
to Selenium Users

I'm having trouble running selenium and gecko and I get 'unknown field `ms`, expected one of `implicit`, `pageLoad`, `script`'


System

  • GeckoDriver Version: 0.23
  • Platform: Windows 10
  • Firefox: 63.0.3 (64 bit)
  • Selenium: Selenium server stand alone 3.141.59

Testcase

In my BeforeScenario of my behat file FeatureContext.php, it says this:

/** @BeforeScenario */
    public function before(BeforeScenarioScope $scope)
    {
        $tags = $scope->getScenario()->getTags();
        if (in_array('skip', $tags)) {
            throw new SkippedException();
        }

         // Reduce the page timeout to expedite test
       $this->getSession()->getDriver()->setTimeouts(['page load' => 60000]);
    }

This is my Git Bash log

┌─ @BeforeScenario # FeatureContext::before() │ ╳ unknown field `ms`, expected one of `implicit`, `pageLoad`, `script` at line 2 column 6 ╳ Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' ╳ System info: host: 'COMPUTER', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191' ╳ Driver info: driver.version: unknown (Exception) │

Selenium Server log

16:41:16.974 INFO [ActiveSessionFactory.apply] - Capabilities are: { "acceptInsecureCerts": true, "browser": "firefox", "browserName": "firefox", "ignoreZoomSetting": false, "marionette": "true;", "name": "Behat feature suite", "tags": [ "COMPUTER", "PHP 7.0.32" ] } 16:41:16.987 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.firefox.GeckoDriverService) 1543250477607 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\USER~1\\AppData\\Local\\Temp\\rust_mozprofile.xc0wSA6bDzje" 1543250483964 Marionette INFO Listening on port 57143 1543250484413 Marionette WARN TLS certificate errors will be ignored for this session 16:41:24.544 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C 16:41:24.583 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session a9efab3a-e3dd-40c5-811d-c6a6c01ba0b3 (org.openqa.selenium.firefox.GeckoDriverService) 1543250484859 Marionette INFO Stopped listening on port 57143 JavaScript error: resource://activity-stream/lib/TopSitesFeed.jsm, line 86: TypeError: setting getter-only property "_currentSearchHostname" [Parent 17068, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 [Child 19036, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 [Child 19036, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 [Parent 17068, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 [Parent 17068, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346 [Chil ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost [GPU 18804, Chrome_ChildThread] WA ###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv 16:41:26.461 INFO [ActiveSessions$1.onStop] - Removing session a9efab3a-e3dd-40c5-811d-c6a6c01ba0b3 (org.openqa.selenium.firefox.GeckoDriverService)

Please let me know if you need more info, I'm new to using all these tools so it would be awesome if you could provide support on this. I'm actually having the same problem with IEDriver but I am just stuck here, help!!

Phil

unread,
Nov 28, 2018, 8:10:22 AM11/28/18
to Selenium Users
Similar thing happens with IE, except I get

  ┌─ @BeforeScenario # FeatureContext::before()
  │
  ╳  Invalid timeout type specified: ms
  ╳  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
  ╳  System info: host: 'PRIVATE', ip: '0.0.0.0', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'

  ╳  Driver info: driver.version: unknown (Exception)

I forgot to attach information about my setup so I will attach some files.

Phil

unread,
Nov 28, 2018, 8:13:20 AM11/28/18
to Selenium Users
Information.docx

Phil

unread,
Nov 29, 2018, 5:17:19 AM11/29/18
to Selenium Users
Update: If I try to run with GeckoDriver 0.21, it doesn't show the same message but I still get this exception 'Fatal error: Class 'Behat\Mink\Exception\ExpectationException' not found in C:\dir\vendor\behat\mink\src\Exception\ElementNotFoundException.php on line 21'
Reply all
Reply to author
Forward
0 new messages