Java 此版本的ChromeDriver仅支持ChromeVersion91“;尝试使用eclipse和Appium服务器运行Android测试用例时显示消息
问题 我无法使用eclipse运行android测试用例,因为不兼容的chrome浏览器和Chromedriver仍然显示 我的设备上的Chrome版本是90,Chromedriver是91。在不升级Chromedriver或Chrome浏览器的情况下,如何通过代码解决此问题 环境 Appium版本:Appium v1.21.0 用于运行Appium:Windows 10 Pro的桌面操作系统/版本 正在测试的移动平台/版本:我在模拟器和Note7(Android 9)上都进行了尝试 真实设备或仿真器/模拟器:在两者上Java 此版本的ChromeDriver仅支持ChromeVersion91“;尝试使用eclipse和Appium服务器运行Android测试用例时显示消息,java,android,google-chrome,selenium-chromedriver,Java,Android,Google Chrome,Selenium Chromedriver,问题 我无法使用eclipse运行android测试用例,因为不兼容的chrome浏览器和Chromedriver仍然显示 我的设备上的Chrome版本是90,Chromedriver是91。在不升级Chromedriver或Chrome浏览器的情况下,如何通过代码解决此问题 环境 Appium版本:Appium v1.21.0 用于运行Appium:Windows 10 Pro的桌面操作系统/版本 正在测试的移动平台/版本:我在模拟器和Note7(Android 9)上都进行了尝试 真实设备或
Details
If necessary, describe the problem you have been experiencing in more detail.
Link to Appium logs
[debug] [W3C] at AppiumDriver.createSession (C:\Users\kibrahim\AppData\Roaming\npm\node_modules\appium\lib\appium.js:387:35)
[HTTP] <-- POST /wd/hub/session 500 35992 ms - 977
[HTTP]
[debug] [Instrumentation] Time: 17.399
[debug] [Instrumentation]
[debug] [Instrumentation] OK (1 test)
[debug] [Instrumentation] The process has exited with code 0
Code To Reproduce Issue [ Good To Have ]
package appiumBasics;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import io.github.bonigarcia.wdm.WebDriverManager;
public class RunWebApplicationAndroidEmulator {
@Test
public void OpenWebApplication() throws MalformedURLException {
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(MobileCapabilityType.BROWSER_NAME, "chrome");
caps.setCapability(MobileCapabilityType.DEVICE_NAME,"KhaledEmulator");
WebDriverManager.chromedriver().setup();
caps.setCapability("chromedriverExecutable",WebDriverManager.chromedriver().getBinaryPath());
// System.setProperty("webdriver.chrome.driver", "path/to/downloaded/driver");
//ChromeOptions chromeOptions = new ChromeOptions();
AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),caps);
driver.get("https://google.com");
String title=driver.getTitle();
System.out.println(title);
driver.findElement(By.name(title)).sendKeys("amman");
//http://localhost:4723/wd/hub
//http://127.0.0.1:4723/wd/hub
}
}
细节
如有必要,请更详细地描述您遇到的问题。
链接到Appium日志
[debug][W3C]位于AppiumDriver.createSession(C:\Users\kibrahim\AppData\Roaming\npm\node\u modules\appium\lib\appium.js:387:35)
[HTTP: