DevTools listening on ws://127.0.0.1:64229/devtools/browser/731cdff6-9e04-4fc3-a1e7-cb3bd55e1f67
Created TensorFlow Lite XNNPACK delegate for CPU.
Test Chrome | FAIL |
SessionNotCreatedException: Message: session not created: DevToolsActivePort file doesn't exist
Stacktrace:
GetHandleVerifier [0x00007FF7CBCCEEB2+31554]
(No symbol) [0x00007FF7CBC47EE9]
(No symbol) [0x00007FF7CBB0872A]
(No symbol) [0x00007FF7CBB45614]
(No symbol) [0x00007FF7CBB3FA34]
(No symbol) [0x00007FF7CBB3BB3B]
(No symbol) [0x00007FF7CBB88794]
(No symbol) [0x00007FF7CBB87DF0]
(No symbol) [0x00007FF7CBB7CDD3]
(No symbol) [0x00007FF7CBB4A33B]
(No symbol) [0x00007FF7CBB4AED1]
GetHandleVerifier [0x00007FF7CBFD8B2D+3217341]
GetHandleVerifier [0x00007FF7CC025AF3+3532675]
GetHandleVerifier [0x00007FF7CC01B0F0+3489152]
GetHandleVerifier [0x00007FF7CBD7E786+750614]
(No symbol) [0x00007FF7CBC5376F]
(No symbol) [0x00007FF7CBC4EB24]
(No symbol) [0x00007FF7CBC4ECB2]
(No symbol) [0x00007FF7CBC3E17F]
BaseThreadInitThunk [0x00007FF8C7477374+20]
RtlUserThreadStart [0x00007FF8C75DCC91+33]
------------------------------------------------------------------------------
Chrometest | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
This might not be a chrome/chromedriver issue. A difference would have give you a warning in the console, and most probably wouldn’t stop start and redirection.
Did you tried to modify and/or disable some of the chrome options:
I tried what you suggested, but I just get an error:
AttributeError: 'Options' object has no attribute '--no-sandbox --disable-dev-shm-usage --disable-extensions'
I tried specifying just one attribute at a time, but still get the AttributeError.
Code:
Library SeleniumLibrary
*** Variables ***
${chrome_options} --no-sandbox --disable-dev-shm-usage --disable-extensions
*** Test Cases ***
Test Chrome
Open Browser https://google.com chrome options=${chrome_options}
sleep 5s
close all browsers
The code you supplied appears to doesn’t cause any errors, but it still does not help getting Chrome to work.
I’m seeing a trace that is similar to the one I posted earlier.
Am I correct in assuming that the --disable-dev-shm-usage argument should be disabling the devtools? I still see the following message when running my code:
DevTools listening on ws://127.0.0.1:54160/devtools/browser/69e0ed97-b8f4-4bac-a0f3-c5b794869271
Created TensorFlow Lite XNNPACK delegate for CPU.
BTW, I appreciate the help. I’m very new to RobotFramework and errors like this are way over my head.
Something I probably should have mentioned earlier is that I’m running my tests from a PyCharm terminal window. Not sure if that makes any difference.
If I switch the browser from chrome to edge or firefox I don’t have any issues, so I’m fairly confident that I have everything installed correctly.
Well… let’s get to the base then.
Can you check or try the following:
After Open Browser, use Go To ${url} keyword, see if it makes a difference
Chrome starts, but it looks like the driver is not available. Is Chromedriver set in PATH on your PC? As Edge and Firefox work, maybe the issue is linked only to the driver access
Check in CMD or shell chromedriver --version and /or verify you have only one version there, and it’s the one you expect
Can you tell what are RF / SeleniumLibrary and Selenium versions are used for info (pip list)?
The message you have seems correct to me, DevTools mention and TensorFlow are usual.
About disable-dev-shm-usage it’s not about DevTools, it disables the use of shared and limited cache folder in specific environnment. Folder is used to speed up access, but sometimes in venv, docker… the small size of this folder lead to issues.
Adding “Go To ${url}” did not make any difference.
The driver is in the same location as my Edge and Firefox drivers. It is on the PATH.
I’m using the Chrome driver Win64 version of ChromeDriver 126.0.6478.182 (5b5d8292ddf182f8b2096fa665b473b6317906d5-refs/branch-heads/6478@{#1776})
My Chrome version is 126.0.6478.183 … Do you think .182 vs .183 could be the issue? I doubt it myself.
Selenium is version 4.23.0. I don’t see SeleniumLibrary or anything similar listed. I also had 4.22.0 installed earlier but did an upgrade install to ensure I had the latest version.
The chrome difference version I don’t think. Already run updated browser with n-1 version chromedriver. You get a warning from RF, but it can work.
Selenium driver is 4.23.0, but should have also a robotframework-seleniumlibrary installed. A version like 6.x.0 (latest is 6.4.0).
Here are the info: python until 3.11, RF 7.0, selenium driver until 4.21 and Seleniumlibrary 6.4.0:
You should verify Seleniumlibrary installation (or use pip to install/update) and versions compatibility as well.
My testing was mixed up with another project in PyCharm, so I’ve created a new project and new venv.
I’ve used pip to install robotframework-selenium library v6.3.0. Selenium is there at v4.23.0. Robotframework is v7.0.1.
Still doing the same thing.
This message makes me wonder why it thinks that Chrome has crashed. I used the Windows task manager to verify that Chrome is running from the correct location, and it stays open after the error occurs.
(The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
At this point I’m thinking of throwing in the towel. All I can think of is that my office administrator has some odd security setting for Chrome, or on WIndows that is affecting things.
Yes I understand. The fact that your IDE with the setup, versions… works on Edge and Firefox points out an issue with chrome access.
Maybe indeed something on the admin conf doesn’t allow/blocks somewhere.
I saw this last parameter to workaround automation detection tools eventually: