簡體   English   中英

設備上未安裝“ Appium Setting”應用

[英]'Appium Setting' app is not installing on device

我正在嘗試在真實設備上運行測試,已安裝測試應用程序,但設備中未安裝“ Appium設置”應用程序。 我有什么需要做的設置嗎? 我啟用了“開發人員選項”,選中了“ USB調試”,選中了“通過USB安裝”

組態:

OS = windows 10
Java_client jar = 6.1.0
Okhttp jar = 3.9.1
htt pclient jar = 4.5.3
appium server = 1.8.1
Real Device = Mi Max 2
Device Os: 7.1.1
testing application type : Hybrid 

當我嘗試執行交換時,在Eclipse中出現以下錯誤:

Logorg.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command.
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: 'ULTP_547', ip: '172.24.4.80', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {app: F:\xx, appPackage: ionic.xx.consumer, appiumVersion: 1.6.2, databaseEnabled: false, desired: {app: F:\xx\automation_fr..., appActivity: ionic.xx.consumer.M..., appPackage: ionic.xx.consumer, appiumVersion: 1.6.2, deviceName: MI Phone, newCommandTimeout: 240, noReset: true, platformName: android, platformVersion: 7.1.1}, deviceManufacturer: Xiaomi, deviceModel: MI MAX 2, deviceName: 29ebd50c, deviceScreenSize: 1080x1920, deviceUDID: 29ebd50c, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 240, noReset: true, platform: LINUX, platformName: Android, platformVersion: 7.1.1, takesScreenshot: true, warnings: {}, webStorageEnabled: false}
Session ID: 83d87d86-b091-4bea-ac22-885e2d448edf

交換代碼:

androidActions.switchToNativeApp(androidDriver);
        Dimension size = androidDriver.manage().window().getSize();
        androidActions.switchToWebApp(androidDriver);
        int startY = (int) (size.height - imageOne.getLocation().getY() - (imageOne
                .getSize().height / 2));
        int startX = (int) (size.width - (imageOne.getSize().width / 2));
        int endX = startX + (imageOne.getSize().height / 4);
        int endY = startY;

        androidActions.switchToNativeApp(androidDriver);
        Utils.waitInSeconds(5);
        for (int i = 0; i < swapPages; i++) {
            try {
                (new TouchAction(androidDriver))
                        .press(new PointOption().withCoordinates(endX, endY))
                        .waitAction(
                                new WaitOptions().withDuration(Duration
                                        .ofMillis(200)))
                        .moveTo(new PointOption().withCoordinates(startX,
                                startY)).release().perform();

            } catch (Exception e) {
                System.out.println("Log" + e);
            }
            Utils.waitInSeconds(2);
        }
        androidActions.switchToWebApp(androidDriver);
        System.out.println("Perform swap action");

    }

Appium服務器錯誤:

Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell ps'
[AndroidDriver] Parsed pid: '10656' pkg: 'ionic.concishare.consumer' from
[AndroidDriver]     USER      PID   PPID  VSIZE  RSS   WCHAN              PC  NAME
[AndroidDriver]     u0_a142   10656 733   1800052 136664 SyS_epoll_ 0000000000 S ionic.concishare.consumer
[AndroidDriver] Returning process name: 'ionic.concishare.consumer'
[AndroidDriver] Found webviews: ["WEBVIEW_ionic.concishare.consumer"]
[AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_ionic.concishare.consumer"]
[AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_ionic.concishare.consumer'
[AndroidDriver] Found existing Chromedriver for context 'WEBVIEW_ionic.concishare.consumer'. Using it.
[JSONWP Proxy] Proxying [GET /url] to [GET http://127.0.0.1:8000/wd/hub/session/8a71e4f4766d239c128db5783598952e/url] with no body
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"8a71e4f4766d239c128db5783598952e\",\"status\":0,\"value\":\"file:///android_asset/www/main.html#/infoSlider\"}"
[W3C] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/83d87d86-b091-4bea-ac22-885e2d448edf/context 200 842 ms - 14
[HTTP] 
[HTTP] --> POST /wd/hub/session/83d87d86-b091-4bea-ac22-885e2d448edf/context
[HTTP] {"name":"WEBVIEW_ionic.concishare.consumer"}
[W3C] Calling AppiumDriver.setContext() with args: ["WEBVIEW_ionic.concishare.consumer","83d87d86-b091-4bea-ac22-885e2d448edf"]
[AndroidDriver] Getting a list of available webviews
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell cat /proc/net/unix'
[AndroidDriver] WEBVIEW_10656 mapped to pid 10656
[AndroidDriver] Getting process name for webview
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell ps'
[AndroidDriver] Parsed pid: '10656' pkg: 'ionic.concishare.consumer' from
[AndroidDriver]     USER      PID   PPID  VSIZE  RSS   WCHAN              PC  NAME
[AndroidDriver]     u0_a142   10656 733   1800052 136664 SyS_epoll_ 0000000000 S ionic.concishare.consumer
[AndroidDriver] Returning process name: 'ionic.concishare.consumer'
[AndroidDriver] Found webviews: ["WEBVIEW_ionic.concishare.consumer"]
[AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_ionic.concishare.consumer"]
[W3C] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/83d87d86-b091-4bea-ac22-885e2d448edf/context 200 762 ms - 14
[HTTP] 
[BaseDriver] Shutting down because we waited 240 seconds for a command
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Stopping chromedriver for context WEBVIEW_ionic.concishare.consumer
[Chromedriver] Changed state to 'stopping'
[JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8000/wd/hub/session/8a71e4f4766d239c128db5783598952e] with no body
[Appium] Closing session, cause was 'New Command Timeout of 240 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'
[Appium] Removing session 83d87d86-b091-4bea-ac22-885e2d448edf from our master session list
[JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"8a71e4f4766d239c128db5783598952e\",\"status\":0,\"value\":null}"
[Chromedriver] Changed state to 'stopped'
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell am force-stop ionic.concishare.consumer'
[ADB] Pressing the HOME button
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell input keyevent 3'
[ADB] Running 'C:\Users\girishk\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s 29ebd50c shell input keyevent 3'

注意:以上代碼可在其他設備上使用。

請任何人都可以看一下

根據服務器錯誤日志-嘗試使用“ newCommandTimeout”所需功能自定義超時。

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(newCommandTimeout, "3000");

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM