macacajs/wd.py

python不支持swipe方法?

Closed this issue · 1 comments

在用python编写脚本时,使用swipe方法,控制台报错,提示Webdriver没有该方法

Traceback (most recent call last):
File "C:/Users/heng.ye/Desktop/Test_Case/macaca_login.py", line 40, in test_login
self.driver.swipe(751,729,87,729,5000)
AttributeError: 'WebDriver' object has no attribute 'swipe'

这是服务器的日志:

responseHandler.js:43:14 [master] pid:7772 Send HTTP Respone to Client: {"ses
sionId":"b7454fd1-5bdf-4ee8-9b4e-b20923daba11","status":0,"value":"{"autoDismis
sAlerts":true,"appPackage":"com.huasheng.stock","appActivity":"com.huash
eng.stock.Loading","deviceName":"Android Emulator","app":"F:\app\h
uasheng-stock-local-0920.apk","platformVersion":"5.0.0","autoAcceptAlerts
":true,"udid":"192.168.81.101:5555","platformName":"Android"}"}
responseHandler.js:11:12 [master] pid:7772 Recieve HTTP Request from Client:
method: DELETE url: /wd/hub/session/b7454fd1-5bdf-4ee8-9b4e-b20923daba11, jsonBo
dy: {}
macaca-android.js:66:16 [master] pid:7772 Error: Command failed: D:\Android\a
ndroid-sdk-windows/platform-tools/adb emu kill
error: no emulator detected

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

session.js:80:12 [master] pid:7772 Delete session, sessionId: b7454fd1-5bdf-4
ee8-9b4e-b20923daba11
responseHandler.js:43:14 [master] pid:7772 Send HTTP Respone to Client: {"ses
sionId":"b7454fd1-5bdf-4ee8-9b4e-b20923daba11","status":0}