Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

'options' argument in 'open browser' not honored when 'browser' argument is set to 'edge' or 'safari'

オープン
#1,778 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

再現用ファイル test.robot と test.py から始め、open browser キーワードがブラウザー値 edge と safari に対する options 引数をどのように処理するかを追跡します。提供されている Selenium と BrowserStack のセットアップで robot test.robot を実行し、結果の capabilities を chrome および firefox と比較します。edge と safari でもオプションが反映されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.
options_honored_chrome
options_not_honored_edge

主要言語
Python
スター
1.5k
フォーク
787
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

robotframework/SeleniumLibrary のほかの issue

robotframework/SeleniumLibrary の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。