如何将iPhone模拟器连接到selgrid 2? [英] How to connect iphone emulator to selgrid 2?

查看:71
本文介绍了如何将iPhone模拟器连接到selgrid 2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了此处中列出的所有步骤,以设置由网络驱动程序支持的iphone仿真器. 创建驱动程序实例时,使用以下代码在本地运行仿真器脚本时,也可以运行该仿真器脚本.

I have done all the steps listed here to setup a webdriver backed iphone emulator. I am also able to run my scripts of the emulator when running them locally using the below code while creating my driver instance.

driver = Selenium::WebDriver.for :remote, :url => "http://localhost:3001/wd/hub", :desired_capabilities => :iphone

我打算做的就是将此仿真器连接到sel网格2,该网格具有在Windows机器上远程运行的集线器.

What I intend to do is connect this emulator to sel grid 2, which has the hub running remotely on a windows machine.

能否请一些人共享命令以在Mac机器(恰好是我的本地机器)上启动selenium webdriver节点.

类似

java -jar selenium-server-standalone-2.21.0.jar -role webdriver -hubHost remotewindowmachine.com -hubPort 4444 -hub http://remotewindowmachine.com:4444/grid/register -host iphoneIP/hub -port 3001 -browser browserName=iphone

这会引发错误

Exception in thread "main" java.net.BindException: Selenium is already running on port 3001.

这似乎很明显,但是我对如何处理感到困惑.

Which seems kind of obvious, but i am confused as to whats to be done about it.

那么有人可以帮我吗?

推荐答案

您无需运行node registration命令即可将其注册到网格中.

You dont have to run the node registration command to register it in a grid.

错误原因

在iPhone(和仿真器)中,当您启动iWebDriverApp时,它将在端口3001中作为远程控制启动.因此,当您尝试在同一计算机上的同一端口(3001)上启动另一个节点时,它将引发此错误.

In iPhone(and emulator) when you start iWebDriverApp it starts in port 3001 as remote control. So when you try to start another node in the same machine on same port(3001) its going to throw this error.

解决方案

我没有在仿真器中尝试过,而是在实际设备中尝试过.在设备上安装iWebDriverApp之后,您需要设置该应用程序的集线器详细信息.可以通过转到设置-> iWebDriverApp 来完成.您将找到文本框来指定集线器URL和端口.然后再次重新启动iWebDriverApp.您的iPhone将位于网格中.

I have not tried it in an emulator, but in the actual device. After installing the iWebDriverApp in your device, you need to set the hub details for the app. This can be done by going to Settings->iWebDriverApp. you will find textboxes to specify Hub URL and the port. Then restart the iWebDriverApp again. Your iphone will be in the grid.

这篇关于如何将iPhone模拟器连接到selgrid 2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆