robotframework / robotframework/SeleniumLibrary
'options' argument in 'open browser' not honored when 'browser' argument is set to 'edge' or 'safari'
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.5k
- Fork
- 787
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Problem statement:
Executing tests using Remote webdriver on BrowserStack but the options object passed under the 'options' parameter under the 'open browser' keyword doesn't get honored when the 'browser' parameter is set to 'edge' or 'safari'.
However, this works when the 'browser' argument is set to either 'chrome' or 'firefox'.
Note: The same also works across all browser argument values when using selenium 3.141.0 and desired_capabilities
Setup information:
python 3.7.12
robotframework 5.0.1
robotframework-seleniumlibrary 6.0.0
selenium 4.3.0
Steps to repro:
- Create the below-mentioned files:
test.robot
*** Settings ***
Library SeleniumLibrary
Library Collections
Library test.py
*** Variables ***
${test_url}= https://google.com
${USERNAME}= %{BROWSERSTACK_USERNAME}
${ACCESSKEY}= %{BROWSERSTACK_ACCESS_KEY}
${REMOTE_URL}= https://${USERNAME}:${ACCESSKEY}@hub-cloud.browserstack.com/wd/hub
*** Keywords ***
Open Session
${opts}= browserstack test
open browser remote_url=${REMOTE_URL} url=${test_url} options=${opts} browser=edge
*** Test Cases ***
Quick Test
Open Session
close browser
test.py
from selenium.webdriver.edge.options import Options
def browserstack_test():
edge_options = Options()
bstack_caps = {
"os" : "Windows",
"osVersion" : "8",
"debug" : "true"
}
edge_options.set_capability("browserVersion", "90")
edge_options.set_capability("bstack:options", bstack_caps)
return edge_options
========================================
- Create a free account on BrowserStack
- Set the BrowserStack username and accesskey of the account under the following env variables on your machine:
BROWSERSTACK_USERNAME
BROWSERSTACK_ACCESS_KEY - Run the test --> robot test.robot
You'll notice that the test runs on a random version of Edge and the 'options' argument doesn't seem to get honored at all.


Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dai file di riproduzione test.robot e test.py, quindi traccia il modo in cui la keyword open browser gestisce l'argomento options per i valori del browser edge e safari. Esegui robot test.robot con la configurazione Selenium e BrowserStack fornita e confronta le capabilities risultanti con quelle di chrome e firefox. Il lavoro è completato quando le opzioni vengono rispettate anche per edge e safari.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa, web-dev
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100