0

My Selenium tests are designed to take screenshots on failure and add them to the report. The screenshots are displaying perfectly for chrome browsers, but Firefox screenshots are just white rectangles.The changelog says something about a "pass through" mode https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG which I've tried to disable, but nothing seems to be working.

Here's my docker compose file:

seleniumhub:
  image: selenium/hub
  ports:
    - 4444:4444

firefoxnode:
  image: selenium/node-firefox-debug
  ports:
    - 4577
  links:
    - seleniumhub:hub
  environment:
    - enablePassThrough=false
    - NODE_MAX_INSTANCES=5
    - NODE_MAX_SESSION=5

chromenode:
  image: selenium/node-chrome-debug
  ports:
    - 4578
  links:
    - seleniumhub:hub
  environment:
    - NODE_MAX_INSTANCES=5
    - NODE_MAX_SESSION=5  
atg
  • 127
  • 2
  • 13

1 Answers1

0

I don't think enablePassThrough is a valid environment variable. The configuration is generated from https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeFirefox/generate_config which only contains your NODE_MAX_INSTANCES and NODE_MAX_SESSION.

However, there is a SE_OPTS variable from the parent base image in the entrypoint at https://github.com/SeleniumHQ/docker-selenium/blob/master/NodeBase/entry_point.sh#L28-L30. You can use this to set -enablePassThrough false. Your service definition in Docker Compose would be something like this instead:

firefoxnode:
  image: selenium/node-firefox-debug
  ports:
    - 4577
  links:
    - seleniumhub:hub
  environment:
    - SE_OPTS="-enablePassThrough false"
    - NODE_MAX_INSTANCES=5
    - NODE_MAX_SESSION=5
Andy Shinn
  • 26,561
  • 8
  • 75
  • 93
  • Thank you. Unfortunately, passing it that way did not work. I got `Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '"-enablePassThrough' but no main parameter was defined` – atg Sep 19 '17 at 19:16
  • Hmm, that sounds like it is passing the quotes verbatim. Trying just as `- SE_OPTS=-enablePassThrough false`. – Andy Shinn Sep 19 '17 at 22:13
  • I got this Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -enablePassThrough=false – atg Sep 25 '17 at 18:16
  • You are pulling the latest tag on all the images. Can you confirm the image ID and also add a tag for the latest `3.5.3-boron` tag? Also, the option says it is for the server. Is it possible it is for the hub only? – Andy Shinn Sep 25 '17 at 18:32