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

Added started log message used in Selenium 4.0.0 #4580

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

tobiasstadler
Copy link
Contributor

No description provided.

@kiview
Copy link
Member

kiview commented Oct 14, 2021

Thanks for providing this PR.
Can you please give some more context regarding the change and need for this?

@tobiasstadler
Copy link
Contributor Author

I updated Selenium to 4.0.0 on my project and the BrowserWebDriverContainer failed to start because non of the current messages are logged by the container anymore. After manully adding waitingFor(Wait.forLogMessage(".*Started Selenium Standalone.*", 1)) the container are starting again and the tests are also working.

Example of container logs for docker run selenium/standalone-chrome:4.0.0:

2021-10-14 08:34:48,824 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2021-10-14 08:34:48,826 INFO supervisord started with pid 8
2021-10-14 08:34:49,829 INFO spawned: 'xvfb' with pid 10
2021-10-14 08:34:49,832 INFO spawned: 'vnc' with pid 11
2021-10-14 08:34:49,835 INFO spawned: 'novnc' with pid 12
2021-10-14 08:34:49,837 INFO spawned: 'selenium-standalone' with pid 13
Setting up SE_NODE_GRID_URL...
2021-10-14 08:34:49,844 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-10-14 08:34:49,845 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-10-14 08:34:49,845 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2021-10-14 08:34:49,845 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Selenium Grid Standalone configuration: 
[network]
relax-checks = true

[node]
session-timeout = "300"
override-max-sessions = false
detect-drivers = false
max-sessions = 1

[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName": "chrome", "browserVersion": "94.0", "platformName": "Linux"}'
max-sessions = 1

Starting Selenium Grid Standalone...
08:34:50.241 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
08:34:50.246 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
08:34:50.795 INFO [NodeOptions.getSessionFactories] - Detected 6 available processors
08:34:50.843 INFO [NodeOptions.report] - Adding chrome for {"browserVersion": "94.0","browserName": "chrome","platformName": "Linux","se:vncEnabled": true} 1 times
08:34:50.858 INFO [Node.<init>] - Binding additional locator mechanisms: name, id, relative
08:34:50.879 INFO [LocalDistributor.add] - Added node 1b12f5e0-f89f-4ddd-8dd5-227a735853c0 at http://172.17.0.2:4444. Health check every 120s
08:34:50.884 INFO [GridModel.setAvailability] - Switching node 1b12f5e0-f89f-4ddd-8dd5-227a735853c0 (uri: http://172.17.0.2:4444) from DOWN to UP
08:34:51.008 INFO [Standalone.execute] - Started Selenium Standalone 4.0.0 (revision 3a21814679): http://172.17.0.2:4444

@bsideup bsideup added this to the next milestone Oct 22, 2021
.parse("selenium/standalone-chrome-debug")
.parse("selenium/standalone-chrome")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised by this - do we not need to be using -debug? 😅

Copy link
Contributor Author

@tobiasstadler tobiasstadler Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -debug images are gone with Selenium 4. The vnc server is now integrated in the normal images.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks for the clarification - you saved me some research!

Copy link
Member

@rnorth rnorth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, as this should help users of Selenium 4.0.0.

@rnorth rnorth merged commit 820161f into testcontainers:master Oct 22, 2021
@tobiasstadler tobiasstadler deleted the selenium-4-startup branch October 22, 2021 12:37
@tobiasstadler
Copy link
Contributor Author

Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants