Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox browser isn't opening #739

Closed
mlagran1 opened this issue Jun 1, 2018 · 8 comments
Closed

Firefox browser isn't opening #739

mlagran1 opened this issue Jun 1, 2018 · 8 comments

Comments

@mlagran1
Copy link

mlagran1 commented Jun 1, 2018

Meta -

Image(s): selenium/node-firefox

Docker-Selenium Image Version(s): 3.12.0-boron

Docker Version: 17.12.0-ce

OS: High Sierra

Expected Behavior -

Browser will open and execute test.

Actual Behavior -

Unfortunately, when I execute the scripts, the test hangs on the first scenario for a long time and then returns:

"Could not open connection: Notice: Undefined index".

Also, the grid console returns:

2 requests waiting for a slot to be free.
Capabilities {browser: firefox, browserName: firefox, ignoreZoomSetting: false, name: Behat feature suite, tags: [behat, PHP 7.0.11], version: *}
Capabilities {browser: firefox, browserName: firefox, ignoreZoomSetting: false, name: Behat feature suite, tags: [behat, PHP 7.0.11], version: *}

I'm also using the selenium/node-chrome image and I have no issues with that one.

Here's my docker-compose and behat.yml:

docker-compose

version: "2"

services:
  # Behat
  behat:
    hostname: behat
    image: docksal/behat
    volumes:
      - .:/src
    # Run a built-in web server for access to HTML reports
    ports:
     - 8000:8000
    entrypoint: "php -S 0.0.0.0:8000"
  # Selenium
  firefox:
    image: selenium/node-firefox:3.12.0-boron
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      HUB_HOST: hub

  chrome:
    image: selenium/node-chrome:3.12.0-boron
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      HUB_HOST: hub

  hub:
    image: selenium/hub:3.12.0-boron
    ports:
      - "4444:4444"

behat.yml

extensions:
    Behat\MinkExtension:
      selenium2: ~
      default_session: selenium2
      # Configure browser. Browser must be available on wd_host.
      browser_name: firefox
      selenium2:
        wd_host: http://hub:4444/wd/hub
        capabilities: { "browser": "firefox", "version": "*"}
@diemol
Copy link
Member

diemol commented Jun 2, 2018

Hi @mlagran1,

I suppose that the matcher can not find a match for "version": "*", you should avoid it or either specify the exact version of the browser you need.

@mlagran1
Copy link
Author

mlagran1 commented Jun 3, 2018

Hey @diemo,l I've tried removing the version, specifying the version and leaving the version as an empty string, but I'm still not having any luck.

I have the same issue when I try IE.

@lmtierney
Copy link
Member

Seems to me this is a w3c issue. I doubt the correct capabilities are being sent for w3c implementation since the Behat/Mink does not support this yet minkphp/MinkSelenium2Driver#254

@mlagran1
Copy link
Author

mlagran1 commented Jun 5, 2018

@lmtierney Do you have any suggestions as a workaround?

@lmtierney
Copy link
Member

There's no workaround that I'm aware of if that is in fact what is causing it not to open. That issue is a year and a half old and Firefox has been running w3c for a long time. They should have been ready for it

@mlagran1
Copy link
Author

mlagran1 commented Jun 5, 2018

Wow, that is really unfortunate...Thanks for the help

@mlagran1
Copy link
Author

mlagran1 commented Jun 5, 2018

The standalone version: selenium/standalone-firefox actually opens up the browser. It can't click elements unfortunately, but at least it opens up. I wonder what the difference between standalone image and node image is.

@diemol
Copy link
Member

diemol commented Jun 7, 2018

Thanks @lmtierney for pointing that out!

@mlagran1 I will close this issue in favour of the one in the minkphp repo, since needs to be solved first to allow you to use the docker-selenium images (and Grid) properly.

@diemol diemol closed this as completed Jun 7, 2018
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants