robotframework / SeleniumLibrary

Web testing library for Robot Framework
Apache License 2.0
1.38k stars 761 forks source link

Remote browser fails when no options provided #1855

Closed emanlove closed 1 year ago

emanlove commented 1 year ago

If using a remote Chrome, Edge or Safari (suspected but not yet proven) and no options are given the `Open Browser' keyword throws an error.

Steps to reproduce the issue

First start a chromedriver instance on port 7272

chromedriver --port=7272

then, in a separate terminal, run the following robot script

*** Settings ***
Library  SeleniumLibrary

*** Variables ***
${URL}            https://robotframework.org/
${REMOTE_BETA}    http://localhost:7272

*** Test Cases ***
Open Chrome with Remote Webdriver
    Open Browser
    ...    url=${URL}
    ...    browser=chrome
    ...    remote_url=${REMOTE_BETA}

Error messages and additional information

An error is raised: AttributeError: 'NoneType' object has no attribute 'to_capabilities'

Expected behavior and actual behavior

should open the browser and navigate to https://robotframework.org/

Environment

Browser: Chrome and Edge Libraries

Acknowldgements

This issue was first reported by Tero Lempiäinen.