Android无法在Windows上将Appium注册到selenium网格

时间:2015-02-10 14:20:14

标签: appium selenium-grid

我正在尝试将Appium注册到本地Selenium网格。以下是我的步骤:

  1. 我可以在
  2. 访问网格控制台
      

    http://localhost:4444/grid/console

    1. 我创建了以下配置json文件: -
    2.   

      {"功能":[{" browserName":" Android","版本":" 4.4.2&# 34 ;,   " maxInstances":1," platform":" Android"," deviceName":   " 4d0002174dca3161",}],"配置":{" cleanUpCycle":2000,   "超时":30000,"代理":   " org.openqa.grid.selenium.proxy.DefaultRemoteProxy"," host":   " 127.0.0.1"," port":4723," url":" http://127.0.0.1:4723/wd/hub",   " maxSession":1,"注册":true," registerCycle":5000," hubPort":   4444," hubHost":" 127.0.0.1"," hub":   " http://127.0.0.1:4444/grid/register" }}

      deviceName来自:

        

      " adb devices"命令

      1. 当我用命令
      2. 启动Appium时
          

        appium --nodeconfig C:\ mobile \ androidConfig.json

        我得到一个例外:

          

        info:欢迎使用Appium v​​1.3.4(REV   c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)信息:Appium REST http   接口监听器在0.0.0.0:4723上启动信息:[debug]非默认值   server args:{" nodeconfig":" C:\ mobile \ androidConfig。 json"}信息:   Console LogLevel:debug error:uncaughtException:无法读取属性   '网址' undefined date = Tue Feb 1 0 2015 15:08:52 GMT + 0200(South   非洲标准时间),pid = 8644,uid = null,gid = n ull,   CWD = C:\用户\管理员\应用程序数据\漫游\ NPM \ node_modules \ appium,   execPath = C:\ Program Files \ nodejs \ node.exe,version = v0.10.30,   argv = [node,C:\ Users \ administrator \ AppDa   ta \ Roaming \ npm \ node_modules \ appium \ bin \ appium.js,-p,4723,   --nodeconfig,C:\ mob ile \ androidConfig.json],rss = 45649920,heapTotal = 35002496,heapUsed = 23290972,lo adavg = [0,0,0],   uptime = 11049.0117945,trace = [column = 32,file = C:\ Users \ administrator \ Ap   pData中\漫游\故宫\ node_modules \ appium \ LIB \服务器\电网register.js,   function = post Request,line = 46,method = null,native = false,column = 7,   文件= C:\用户\管理员\ APPD   ATA \漫游\故宫\ node_modules \ appium \ LIB \服务器\电网register.js,   function = null,line = 14,method = null,native = false,column = 14,   file = fs.js,function = null,line = 2 71,method = null,native = false,   column = 15,file = fs.js,function = Object.oncomplete,line = 107,   method = oncomplete,native = false],stack = [TypeError:无法读取道具   erty' url'未定义,在postRequest   (C:\用户\管理员\应用程序数据\漫游\ NPM   \ node_modules \ appium \ lib \ server \ grid-register.js:46:32),at   C:\用户\管理员\   应用程序数据\漫游\ NPM \ node_modules \ appium \ lib中\服务器\网格register.js:14:7,   在fs.js:271:14,在Object.oncomplete(fs.js:107:15)]

        我做错了什么?

        感谢。

1 个答案:

答案 0 :(得分:1)

好的,这是一个愚蠢的错字。

“配置”节点写错了。它应该是“没有s”的配置。另外,在平台方面,它应该是MAC或WINDOWS

上述更改后,

节点已成功注册到网格。