简体   繁体   English

robot framework - 使用selenium grid启动远程浏览器时出错

[英]robot framework - Error when launching remote browser with selenium grid

first time posting here so forgive me if I am missing any details. 如果我遗漏任何细节,请第一次在这里发帖,请原谅我。

I am using the following setup: 我使用以下设置:
robot framework: 3.0.1 (Python 2.7.10) 机器人框架:3.0.1(Python 2.7.10)
selenium: 3.4.1 硒:3.4.1
selenium2library: 1.4.1 selenium2library:1.4.1

I have one mac machine configured as the grid hub and another as the node. 我有一台mac机器配置为网格集线器,另一台mac机器配置为节点。

Here is my RF test: 这是我的RF测试:

Open Browser    url=http://www.google.com    browser=firefox    remote_url=http://hub-server:4444/wd/hub    desired_capabilities=browser:firefox
Maximize Browser Window

I am just trying to open the browser on the other machine for right now to get it working but I get the below error when trying to execute the script: 我只是想尝试在其他机器上打开浏览器以使其正常工作,但在尝试执行脚本时出现以下错误:

KeyError: 'desiredCapabilities' KeyError:'desiredCapabilities'

When I change my test to: 当我将测试更改为:

Open Browser    url=http://www.google.com    browser=firefox    remote_url=http://hub-server:4444/wd/hub    desiredCapabilities=browser:firefox
Maximize Browser Window

I get this error: 我收到此错误:

Keyword 'Selenium2Library.Open Browser' got positional argument after named arguments. 关键字'Selenium2Library.Open Browser'在命名参数后得到了位置参数。

I googled around and found https://github.com/SeleniumHQ/selenium/issues/3808 but I am not sure if this is related to my issue. 我用Google搜索并找到了https://github.com/SeleniumHQ/selenium/issues/3808,但我不确定这是否与我的问题有关。 Any help is much appreciated. 任何帮助深表感谢。 Thanks! 谢谢!

According to the documentation, the keyword is desired_capabilities , not desiredCapabilities 根据文档,关键字是desired_capabilities ,而不是desiredCapabilities

If you specify a value for remote you can also specify 'desired_capabilities' which is a string in the form key1:val1,key2:val2 that will be used to specify desired_capabilities to the remote server. 如果为remote指定值,则还可以指定'desired_capabilities',它是key1:val1,key2:val2形式的字符串,用于指定远程服务器的desired_capabilities。 This is useful for doing things like specify a proxy server for internet explorer or for specify browser and os if your using saucelabs.com. 这对于为Internet Explorer指定代理服务器或指定浏览器和操作系统(如果使用saucelabs.com)非常有用。 'desired_capabilities' can also be a dictonary (created with 'Create Dictionary') to allow for more complex configurations. 'desired_capabilities'也可以是dictonary(用'Create Dictionary'创建)以允许更复杂的配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用机器人框架实现硒网格 - Selenium grid Implementation with Robot framework Robot Framework:打开Chrome浏览器而不启动URL - Robot Framework: Open a chrome browser without launching URL 启动robotframework-RIDE(Robot Framework IDE)时出错 - Error while launching robotframework-RIDE (Robot Framework IDE) 用于机器人关键字的机器人框架远程服务器 - Robot Framework Remote Server for Robot Keywords 当我使用 Robot 框架执行脚本时,任何浏览器都没有打开 - any of the Browser is not opening, when i execute the script using Robot framework 如何使用 Python、JavaScript 或 Robot Framework 和 Selenium 使用部分标题文本导航到新的浏览器窗口 - How to navigate to new browser window using partial title text using either Python, or JavaScript or Robot Framework and Selenium 机器人框架:将机器人框架与MySql连接时,出现“ FAIL:NoSectionError:No section:'default'”错误 - Robot Framework :I am getting “FAIL : NoSectionError: No section: 'default' ” error when i connect the Robot Framework with MySql 无法在 Robot Framework 中使用 Selenium2Library。 导入错误:没有名为 Selenium2Library 的模块错误 - Unable to use Selenium2Library in Robot Framework. ImportError: No module named Selenium2Library error Robot Framework:如何在Robot Framework中使用用户创建的浏览器实例 - Robot Framework: How to use User created browser instance in Robot framework 异常:无法启动新的浏览器会话:在Python中启动浏览器Selenium时出错 - Exception: Failed to start new browser session: Error while launching browser Selenium in Python
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM