Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,778 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
testing-qa, web-dev

Hướng nghiên cứu

Bắt đầu với các tệp tái hiện test.robot và test.py, sau đó theo dõi cách từ khóa open browser xử lý đối số options cho các giá trị trình duyệt edge và safari. Chạy robot test.robot với thiết lập Selenium và BrowserStack được cung cấp, rồi so sánh các capabilities thu được với chrome và firefox. Hoàn tất khi các tùy chọn cũng được áp dụng cho edge và safari.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
1.5k
Fork
787
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của robotframework/SeleniumLibrary

Tất cả issue của robotframework/SeleniumLibrary

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.