Microsoft Appcenter Appium Chromedriver自动下载

我正在尝试为appcenter.ms中的appium测试自动下载chromedriver。我已经使用了以下功能,但仍然无法正常工作。

部分代码:

    DesiredCapabilities cap = new DesiredCapabilities();
    String[] chromeArgs = {"--allow-insecure-localhost","--disable-web-security"};
    cap.setCapability("chromedriverArgs",chromeArgs);
    //cap.setCapability("chromedriverExecutableDir","/appiumTests/src/test/resources");
    cap.setCapability("appium:chromeOptions",ImmutableMap.of("w3c",false));
    cap.setCapability("autoWebview",true);
    cap.setCapability("newCommandTimeout",600);
    cap.setCapability("appWaitDuration",60000);
    cap.setCapability("androidInstallTimeout",60000);
    cap.setCapability("automationName","UiAutomator2");
    cap.setCapability("uiautomator2ServerInstallTimeout",60000);
    cap.setCapability("adbExecTimeout",60000);
    cap.setCapability("autoacceptAlerts",true);
    cap.setCapability("networkConnectionEnabled",true);
    cap.setCapability("automationName","uiautomator2");
    cap.setCapability("nativeWebTap",true);
    //cap.setCapability("","");
    
    driver = Factory.createAndroidDriver(cap);

日志:

2020-09-10 02:27:36:051 [ADB] Running '/opt/android-tools-and-config1804/android-sdk-linux/platform-tools/adb -P 5037 -s ZL5227ZPBD shell dumpsys package com.android.chrome'2020-09-10 02:27:36:149 [Chromedriver] Found Chrome bundle 'com.android.chrome' version '84.0.4147'2020-09-10 02:27:36:150 [Chromedriver] The most recent known Chrome version: 83.0.41032020-09-10 02:27:36:153 [Chromedriver] Error: No Chromedriver found that can automate Chrome '84.0.4147'. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details2020-09-10 02:27:36:153 [Chromedriver]     at Chromedriver.getcompatibleChromedriver (/opt/appium/deps/appium/node_modules/appium-chromedriver/lib/chromedriver.js:360:15)2020-09-10 02:27:36:153 [Chromedriver]     at Chromedriver.initChromedriverPath (/opt/appium/deps/appium/node_modules/appium-chromedriver/lib/chromedriver.js:384:11)2020-09-10 02:27:36:154 [Chromedriver]     at Chromedriver.start (/opt/appium/deps/appium/node_modules/appium-chromedriver/lib/chromedriver.js:449:7)2020-09-10 02:27:36:154 [Chromedriver]     at AndroidUiautomator2Driver.setupNewChromedriver (/opt/appium/deps/appium/node_modules/appium-android-driver/lib/commands/context.js:384:3)2020-09-10 02:27:36:155 [Chromedriver]     at AndroidUiautomator2Driver.startChromedriverProxy (/opt/appium/deps/appium/node_modules/appium-android-driver/lib/commands/context.js:133:10)2020-09-10 02:27:36:155 [Chromedriver]     at AndroidUiautomator2Driver.switchContext (/opt/appium/deps/appium/node_modules/appium-android-driver/lib/commands/context.js:69:5)2020-09-10 02:27:36:156 [Chromedriver]     at AndroidUiautomator2Driver.setContext (/opt/appium/deps/appium/node_modules/appium-android-driver/lib/commands/context.js:60:3)2020-09-10 02:27:36:156 [Chromedriver]     at wrapped (/opt/appium/deps/appium/node_modules/asyncbox/lib/asyncbox.js:35:13)2020-09-10 02:27:36:157 [Chromedriver]     at retry (/opt/appium/deps/appium/node_modules/asyncbox/lib/asyncbox.js:18:13)2020-09-10 02:27:36:158 [Chromedriver]     at retryInterval (/opt/appium/deps/appium/node_modules/asyncbox/lib/asyncbox.js:45:10)2020-09-10 02:27:36:158 [Chromedriver]     at AndroidUiautomator2Driver.startUiAutomator2Session (/opt/appium/deps/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:420:7)2020-09-10 02:27:36:159 [Chromedriver]     at AndroidUiautomator2Driver.createSession (/opt/appium/deps/appium/node_modules/appium-uiautomator2-driver/lib/driver.js:221:7)2020-09-10 02:27:36:159 [Chromedriver]     at AppiumDriver.createSession (/opt/appium/deps/appium/lib/appium.js:412:35)2020-09-10 02:27:36:159 [Chromedriver] No Chromedriver found that can automate Chrome '84.0.4147'. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details2020-09-10 02:27:36:160 [UiAutomator2] Deleting UiAutomator2 session
iCMS 回答:Microsoft Appcenter Appium Chromedriver自动下载

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1594623.html

大家都在问