'Getting TimeoutException: Message: timeout: Timed out receiving message from renderer: 300.000 only when using Jenkins for Switch Window on Chrome

I'm using different web urls in tabs in one browser, in order to get the required value from one website and add it to the other.

I use a robot framework for the tests and they work as expected and always pass when running locally.

The problem arises when the same scripts run on Jenkins. In some cases they manage to pass on Jenkins, but more often the error occurs:

Keyword 'Capture Page Screenshot' could not be run on failure: TimeoutException: Message: timeout: Timed out receiving message from renderer: 300.000 (Session info: chrome=97.0.4692.71).

I am using 'Switch Window' keyword from Selenium Library, i.e. the error appears when the url is opened in a new tab and switching to it usually fails. Also, I tried by using the keyword 'Wait Until Keyword Succeeds', but it did't help and the same error appears.

Wait Until Keyword Succeeds  1 min 15 seconds  Open a new tab with the URL ###PASS

Wait Until Keyword Succeeds 1 min 15 seconds Switch to the new tab ###FAIL

enter image description here

Is there a suggestion for a solution to this problem?



Solution 1:[1]

Solved by using builtin sleep after switch window.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bettymk