Wechat_jump_game: iOS成功的大佬,求出个详细点的教程。。

Created on 30 Dec 2017  ·  22Comments  ·  Source: wangshub/wechat_jump_game

iOS

Most helpful comment

大概为一下顺序

  1. 克隆 WebDriverAgent 项目 git clone https://github.com/facebook/WebDriverAgent
  2. 安装 Carthage brew install carthage
  3. 执行 ./Scripts/bootstrap.sh
  4. 打开 WebDriverAgent 项目并按照教程修改, 运行 Product -> Test
  5. 安装端口转发 brew install libimobiledevice
  6. 转发端口 iproxy 8100 8100 , 窗口不要关闭或者终止运行
  7. 访问 http://localhost:8100/status 有内容显示
  8. 再打开一个新的终端进入到克隆的 wechat_jump_game 目录下面
  9. pip3 install --pre facebook-wda
  10. pip3 install -r requirements.txt
  11. python3 wechat_jump_iOS_py3.py

All 22 comments

大概为一下顺序

  1. 克隆 WebDriverAgent 项目 git clone https://github.com/facebook/WebDriverAgent
  2. 安装 Carthage brew install carthage
  3. 执行 ./Scripts/bootstrap.sh
  4. 打开 WebDriverAgent 项目并按照教程修改, 运行 Product -> Test
  5. 安装端口转发 brew install libimobiledevice
  6. 转发端口 iproxy 8100 8100 , 窗口不要关闭或者终止运行
  7. 访问 http://localhost:8100/status 有内容显示
  8. 再打开一个新的终端进入到克隆的 wechat_jump_game 目录下面
  9. pip3 install --pre facebook-wda
  10. pip3 install -r requirements.txt
  11. python3 wechat_jump_iOS_py3.py

@shiniv 我是挂在requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8100) 该试的方法都试了

@liyaofei 你看下目录是不是有写入权限 有可能是不能保存截图在当前目录

@GhostClock 你试一下这样测试

  1. 运行 Product -> Test 的时候 状态栏会显示 Testing 然后手机会闪一下黑屏 然后回到桌面
  2. Console 的最后应该会有类似一下内容

WebDriverAgentRunner-Runner[2100:2200013] Built at Dec 30 2017 15:54:39
WebDriverAgentRunner-Runner[2100:2200013] ServerURLHere->http://IP:8100<-ServerURLHere

  1. 如果访问 Console 提供的IP地址 http://IP:8100/status 有内容, 那就不用执行 iproxy 8100 8100

@liyaofei 访问 localhost:8100/status 有内容 json 么

我也有类似的报错啊,能打开看到json 然后terminal运行保下面的错,该安的都安了,很难受。。
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /status (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))

@shiniv
不加 iproxy 8100 8100 http://IP:8100http://localhost:8100/都没json数据,
加了iproxy 8100 8100 http://IP:8100打不开,但是http://localhost:8100/有数据

@liyaofei 请问你解决了吗 我也是这个问题

@shiniv requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))是什么情况

出现requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8100)

wechat_jump_iOS_py3.py的14行改成

c = wda.Client('http://192.168.1.5:8100')

192.168.1.5是Console出来的IP

必须手动点击两个方块一下,才开始跳动?

@khalilleo
改了
c = wda.Client('http://192.168.0.102:8100')

还是不行
retry to connect, error: HTTPConnectionPool(host='192.168.0.102', port=8100): Max retries exceeded with url:

@GhostClock
你用了iproxy 8100 8100吗 用了这个的话直接localhost:8100就可以了
没有的话才用IP地址
(有些情况下wifi下不使用usb转发的话的确是连不上)

@khalilleo
iproxy 8100 8100转发后,在浏览器可以打开 http://localhost:8100/inspector 也能看见手机画面,就是卡,但是在浏览器里面打不开http://192.168.0.102:8100;不转发连http://localhost:8100/inspector 都打不开,用Python跑还是报HTTPConnectionPool异常

iPhone 7 plus跳一步之后界面刷新不完整,有大佬遇到过么,求解决方法。

@GhostClock 你解决了嘛?我也挂在同样的地方了
retry to connect, error: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /status (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 61] Connection refused',))

@caoyunxiao
自动脚本 -> #271

支持iPhone(iOS)自动的,自己测试可用

请问WebDriverAgent中证书签名怎么处理

@jack80342 没有呀,你呢??

运行 WebDriverAgentRunner 出现错误:

2018-01-03 16:59:30.141296+0800 WebDriverAgentRunner-Runner[4912:2600949] Enqueue Failure: Application local.pid.4809 is not running /Users/meilbn/Development/iOSCode/Github/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1
2018-01-03 16:59:30.141945+0800 WebDriverAgentRunner-Runner[4912:2600949] *** Assertion failure in -[XCUIScreen _screenshotDataForQuality:rect:error:], /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-13764/Sources/UITesting/XCUIScreen.m:230
To screenshot a frame, it must have non-0 area.
(null)

6175229976

wda 的 inspector 里面也看不到 Screen,有人知道为什么吗?搞了好久没搞定。。。
就是截屏失败的问题。

@GhostClock 我用端口转发解决了

@jack80342 我用端口转发了,localhost:8100/inspector 是有画面
但是,
retry to connect, error: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x113cb5748>: Failed to establish a new connection: [Errno 61] Connection refused',))
这个报错你是怎么解决的啊?

@kaelzzs 我用了端口转发之后就没有出这个错误了(´・ω・`)

Was this page helpful?
0 / 5 - 0 ratings