For the test failed cases when running with KRE on dynamic environment (Azure DevOps, Jenkins, etc), the root cause is from Chrome and Selenium's limitation.
This is a timeout exception of the Webdriver that waits for the page load before performing actions.
When the page takes more time to load and exceeds the time out in the settings page, the exception will throw. When we change the config to wait until the page is loaded, Katalon/Selenium will wait until the page is loaded up to 600 seconds. After that time, the test will fail due to TimeOutException and the root cause is what we mention before.
There is no completed solution from us because the issue is more about the page load timeout or Selenium limitation.
[2021-09-23T02:38:06.190] Caused by: org.openqa.selenium.SessionNotCreatedException: session not created
[2021-09-23T02:38:06.190] from timeout: Timed out receiving message from renderer: 600.000
[2021-09-23T02:38:06.190] (Session info: chrome=93.0.4577.82)
There are some solutions to help you work with this situation, please read through carefully and try different ways.
Solution 1: Downgrade your Chrome version, please try to make sure the version of browsers is equal to the version of browser drivers.
For example: Chrome Browser version = Chrome Driver version = 86.
For your case, in case the versions are different, please try to check again. Then, I suggest downgrading both of Chrome browser and driver version to be similar.
Kindly follow this instruction to change your Chrome version then try to Update WebDrivers from Katalon (How to handle some Web Drivers issues?) to see how it works for you.
Note: Please remove the old file and download/paste it again (to ensure the file is correct and not use the old one).
To use KRE with Chrome v93, we suggest you:
Fully install Chrome v93. When Chrome is being updated, let it update successfully then start the automation test. Please ensure that all of the Chrome processes are ended. Below will show you the suggested methods to terminate Chrome processes.
The reason behind this is because when you are doing test cases on Katalon, the Chrome browsers updated themselves automatically. This brings trouble as KRE may not update following with Chrome. Other than that, when you download another Chrome version, its processes are not terminated yet, it may be in hidden status.
Close all running chromedriver.exe processes. We can use this command to terminate these processes:
1taskkill /f /im chromedriver.exe
Here are some other suggested methods to terminate Chrome process:
Search for cmd/Command Prompt in the search bar.
Open cmd with "Run as Administrator"option (Use right-click to get the menu).
Use the command tasklist to list all processes.
Use the command taskkill /F /IM "chrome.exe" /T to terminate all its processes.
The error log shows that webdriver takes more time to load page, please check your network connection. Here is related discussion where many users got into the struggle of Chrome lastest version: Selenium Timed out receiving message from renderer
Increase the page load timeout from 30 to a higher value to reduce the test failure.
To do so, please check Project Settings > Execution/Web UI, the Default page load timeout should be Wait until the page is loaded (default).
Add some delay before invoking the next test case or open the browser step to let the system stabilize before starting a new session. When we change the page load strategy from normal to eager as the previous solution, the page will only load and wait for DOM events that are lesser events than the normal strategy, so the loading time will be reduced.
Check with your dev team about the AUT's loading time (recommended)
pageLoadStrategy: eagerdesired capability in Desired Capabilities
Solution 4: Use Chrome flag
You can use --disable-gpu the argument from KSE.
To do so, please open Project Settings from KSE > Desired Capabilities > WebUI > Chrome
Click on "Add"
Change information as below:
At the moment,
–disable-gpu arg you can keep this in Katalon, as it belongs to the project setting, you don’t need to remove it for the next chrome update. Please keep in mind that this argument belongs to Chrome’s command line flags function to disable the Hardware Acceleration when opening graphics and reduce the RAM when using the browser.