Closed bhargavkumar-65 closed 6 years ago
Hi @bhargavkumar-65,
That capability can be only set per test, not as a command line parameter:
As per the docs:
By default, Zalenium allows a test to be idle up to 90 seconds. After that elapsed time, the session will be terminated, the node will be shutdown and the recorded video will be saved (if video recording is enabled). This prevents a test to run indefinitely after something went wrong. If you need to have a longer idle timeout, just set an idleTimeout capability in your test. Example code in Java for the capability (it sets the idleTimeout to 150 seconds):
DesiredCapabilities desiredCapabilities = new DesiredCapabilities(); desiredCapabilities.setCapability(CapabilityType.BROWSER_NAME, BrowserType.FIREFOX); desiredCapabilities.setCapability(CapabilityType.PLATFORM_NAME, Platform.LINUX); desiredCapabilities.setCapability("idleTimeout", 150);
@diemol Thank you. It will be very helpful if we can send it as command line parameter, as most of the new automation tools are code less. Setting Desired capabilities is not possible if im using external tools like: https://github.com/Ginger-Automation/Ginger (My Company's open source Automation Tool)
@bhargavkumar-65 no matter the framework, you would still need to set capabilities like the browser name or the browser version, many enhanced Selenium Grids have custom capabilities, so I would suggest to add this to the framework through a configuration file for example.
@diemol thank you. I will Suggest Ginger tool developers to provide the same. have a nice day.
Zalenium Image Version(s):
Docker Version:
OS:
Docker Command to start Zalenium: docker run -d -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --maxTestSessions 20 --chromeContainers 3 --firefoxContainers 0 --videoRecordingEnabled true --maxDockerSeleniumContainers 4 --keepOnlyFailedTests true --idleTimeout 3000
Expected Behavior -
I am using my company's inbuilt automation tool called Ginger. this is a code less automation tool. I am aiming to provide the IdleTimeout as a command while creating Hub itself (passing command like --idleTimeout 150). Can Someone help me how can i set IdleTimeout while starting Zalenium itself.
In our Ginger-Automation tool we don't have any options to provide Desired capabilities like in selenium. we can redirect all the tests to hub created anyway.
Actual Behavior -
idleTimeout should be accepted as a command while creating Zalenium Itself.
like below: Docker Command to start Zalenium: docker run -d -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --idleTimeout 3000