0

Here my sample code:

*** Settings ***
Library    SeleniumLibrary

*** Variables ***
${URL}           https://www.google.com
${BROWSER}       chrome
*** Test Cases ***
Browse Google
    Open Browser    ${URL}    ${BROWSER}
    Maximize Browser Window
    Title Should Be    Google
    Sleep    3s
    Close Browser

When I run this code it open browser but not navigate to website:

Chrome

Result at console as per below:

Openbrowser
==============================================================================
Browse Google
DevTools listening on ws://127.0.0.1:50331/devtools/browser/bd57fd84-106d-4cd9-af6d-e9d7c1de2266     
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1750070688.179921   17040 voice_transcription.cc:58] Registering VoiceTranscriptionCapability
Browse Google                                                         | FAIL |
ReadTimeoutError: HTTPConnectionPool(host='localhost', port=50328): Read timed out. (read timeout=120)
------------------------------------------------------------------------------
Openbrowser                                                           | FAIL |
1 test, 0 passed, 1 failed

I tried to update webdriver and browser to latest and check path is correct.

5
  • Your test worked fine in my environment, Windows 10, Python 3.12.2: C:\>chromedriver --version ChromeDriver 137.0.7151.70 (dfa4dc56b2abb56eb2a14cad006ea5e68c60d5de-refs/branch-heads/7151@{#1875}) C:\GitHub\RIDE>pip show robotframework Name: robotframework Version: 7.3 C:\>pip show robotframework-seleniumlibrary Name: robotframework-seleniumlibrary Version: 6.7.1 Commented Jun 16 at 12:08
  • are you configuring a port for the driver? 50331 != 50328 Commented Jun 16 at 16:50
  • I didn't config port and dont know how to config Commented Jun 17 at 1:35
  • Today I try Open vscode with not administrator then working but i dont know why Commented Jun 17 at 8:03
  • if no port is set the driver will try to read the file the browser drops when in dev-mode. That file includes the port and sessionID for wire protocol. It's possible it was reading an old file from a previous session. (if that session crashed and didn't cleanup) I forgot the directory it drops the file in but I believe it is per user. Commented Jun 17 at 16:15

1 Answer 1

0

pip install webdrivermanager

webdrivermanager chrome --linkpath /usr/local/bin

(check if chrome driver is in PATH)

Sign up to request clarification or add additional context in comments.

1 Comment

As original author of webdrivermanager - the tool is not updated anymore and selenium ships with Selenium Manager that provides the same functionality if you are on new enough selenium version. selenium.dev/documentation/selenium_manager

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.