'options' argument in 'open browser' not honored when 'browser' argument is set to 'edge' or 'safari'
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa, web-dev
调研方向
从复现文件 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.


- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 787
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
robotframework/SeleniumLibrary 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
robotframework/SeleniumLibrary#1941 · 3 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
robotframework/SeleniumLibrary#1833 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
robotframework/SeleniumLibrary#1436 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 58/100
robotframework/SeleniumLibrary#1993 ·
-
难度 4/5 3-5 天 新手友好度 35/100
robotframework/SeleniumLibrary#1992 · 4 条评论 ·
查看 robotframework/SeleniumLibrary 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100