S
S
SuperTester7772020-01-28 13:54:43
linux
SuperTester777, 2020-01-28 13:54:43

How to set timeout for selenide in docker container?

The problem is that autotests that wait more than 60 seconds in some steps fall from webdriverexception.
I read that the problem is that if there were no requests to selenium api within 60 seconds, then the session is forcibly interrupted.
This setting can be controlled. It is set up like something like that, but such a command is not suitable for me:

sudo ./cm_linux_amd64 selenoid start --args "-session-attempt-timeout 5m -service-startup-timeout 5m"

In the official documentation of Selenide, it is not clear how to set this timeout, by which command.

Also I can't get into the docker container. On command docker exec -it 9f26edbf7560 bashor docker exec -it 9f26edbf7560 shget error:
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"bash\": executable file not found in $PATH"


There are three questions in total.
1. What should be the sequence of actions in order to set the desired timeout?
2. Which team should eventually set the timeout?
3. Are there several types of timeout?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Priluzkiy, 2020-01-28
@Oxyd

Maybe the documentation on selenium will push you to something?

java -jar selenium-server-standalone-{VERSION}.jar -timeout=20 -browserTimeout=60

If selenide is based on the selenium server, then in theory it should.
Although the selenide doc says something different than what you wrote...
-Dselenide.timeout=10000
The value is in milliseconds.
Configuration settings for Selenide default browser
This class is designed so that every setting can be set either via system property or programmatically.
Please note that all fields are static, meaning that every change will immediately reflect in all threads (if you run tests in parallel).
These system properties can be additonally used having an effect on every new created browser in test. For example as -D= in command-line
chromeoptions.args - Sets the arguments for chrome options, parameters are comma separated If comma is a part of the value, use double quotes around the argument Non-official list of parameters can be found at https://peter.sh/experiments/chromium-command-line... Example: --no-sandbox,--disable-3d-apis,"--user-agent=Firefox 45, Mozilla"
chromeoptions.prefs - Sets the preferences for chrome options, which are comma separated keyX=valueX preferences. If comma is a part of the value, use double quotes around the preference List of preferences can be found at https://chromium.googlesource.com/chromium/src/+/m... Example: homepage= http:// google.com, "intl.allowed_languages=en,ru,es"

You can’t enter the container for the simple reason that the container simply doesn’t have an interactive shell, which the docker honestly told you about.
And yes... Alfa-Bank burned down. ;-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question