[英]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.