还未发布过话题
  • 您好,请教下楼主,我在使用 driver.manage().window().getSize(),总是会报错:麻烦您帮我看下,是版本不支持嘛?
    org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
    (Session info: webview=33.0.0.0)
    (Driver info: chromedriver=2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 32 milliseconds
    Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
    System info: host: 'GTP-LAB6324', ip: '192.168.69.44', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_55'
    Session ID: 9c45ec78-59e0-4597-a6f3-9be36b0e8ff3
    Driver info: io.appium.java_client.android.AndroidDriver
    Capabilities [{platform=LINUX, app=E:\GLM_appium\apps\GLM.apk, javascriptEnabled=true, browserName=, networkConnectionEnabled=true, udid=192.168.56.101:5555, desired={autoAcceptAlerts=true, app=E:\GLM_appium\apps\GLM.apk, platformVersion=4.4, deviceName=Android Emulator, platformName=Android, browserName=, unicodeKeyboard=true, resetKeyboard=true, udid=192.168.56.101:5555}, locationContextEnabled=false, autoAcceptAlerts=true, platformVersion=4.4.4, databaseEnabled=false, platformName=Android, deviceName=192.168.56.101:5555, webStorageEnabled=false, unicodeKeyboard=true, resetKeyboard=true, warnings={}, takesScreenshot=true}]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:876)
    at com.glm.task.Team_Task.swipeToDown(Team_Task.java:119)
    at com.glm.testcase.team.TestP0_TeamSearcher.setUp(TestP0_TeamSearcher.java:36)

    info: <-- POST /wd/hub/session/9c45ec78-59e0-4597-a6f3-9be36b0e8ff3/execute 200
    1249.488 ms - 72
    info: --> GET /wd/hub/session/9c45ec78-59e0-4597-a6f3-9be36b0e8ff3/window/curren
    t/size {}
    info: JSONWP Proxy: Proxying [GET /wd/hub/session/9c45ec78-59e0-4597-a6f3-9be36b
    0e8ff3/window/current/size] to [GET http://127.0.0.1:9515/wd/hub/session/7ec9537
    7e7edf1f5576beb0b362f881d/window/current/size] with body: {}
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"7ec95377e7edf1f5
    576beb0b362f881d","status":13,"value":{"message":"unknown error: operation is un
    supported on Android\n (Session info: webview=33.0.0.0)\n (Driver info: chrome
    driver=2.1...
    info: <-- GET /wd/hub/session/9c45ec78-59e0-4597-a6f3-9be36b0e8ff3/window/curren
    t/size 200 23.960 ms - 290
    info: [debug] Didn't get a new command in 60 secs, shutting down...

  • @532589730 ,你好,我问个比较二的问题哈,命令行 npm 安装的 appium 怎么打开图形界面啊