Issue with Updating from appium for windows 1.8.1 to appium 1.22.3
See original GitHub issueThe problem
Issue with Updating from appium for windows 1.8.1 to appium 1.22.3 I’m using IntelliJ IDEA Community Edition 2022.2 with Java and JDK 17.0.4 with windows 10. npm version 8.11.0 nodejs version - last. In order to test windows application. on a real machines.
download new Node.js. Deleted uninstalled current version of Appium and installed appium with: npm -g appium I also updated the the last window application driver to: WinAppDriver v1.2.1
Using appium doctor - everything seems OK.
In my pom.xml file I updated: <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.2.1</version> </dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>8.1.1</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
I’m trying to start appium service with:
service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingDriverExecutable(new File( “C:\Program Files\nodejs\node.exe”)).withAppiumJS(new File( “C:\Users\” + user + “\AppData\Roaming\npm\node_modules\appium\build\lib\main.js”)). withArgument(GeneralServerFlag.LOG_LEVEL, “warn”). //warn withIPAddress(“127.0.0.1”).usingAnyFreePort());// usingAnyFreePort());//“127.0.0.1” “192.168.1.93” service.start();
and start lunch the application with:
DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.setCapability(“deviceName”, “WindowsPC”); appCapabilities.setCapability(“app”, BIN_PATH + “CathWorksUI.exe”); //C:\Cathworks\bin\CathWorksUI.exe Microsoft.WindowsCalculator_8wekyb3d8bbwe!App appCapabilities.setCapability(“newCommandTimeout”, 9000); appCapabilities.setCapability(“automationName”, “appium”); appCapabilities.setCapability(“platform”, “Windows 10”);
appium = new WindowsDriver<WindowsElement>(service.getUrl(), appCapabilities);
I have 3 issues: First: I get the following error when trying to start the service:
io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException: The local appium server has not been started.
appium = new WindowsDriver<WindowsElement> error is shown.
also under:
protected static WindowsDriver<?> appium
and under:
appium.findElementByAccessibilityId("element")
is not recognized anymore.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@nir-tal-talkspace It is not working for appium for windows. AppiumBy is not recognizable.
But I did some changes in the way I start my driver so now it is working…
I changed: appium = new WindowsDriver<WindowsElement>(service.getUrl(), appCapabilities);
To: appium = new AppiumDriver<>(service.getUrl(), appCapabilities);
and change from: protected static WindowsDriver<?> appium;
To: protected static AppiumDriver<WebElement> appium;
now everything is working as before.
@nir-tal-talkspace & @mykola-mokhnach Can you please assist: I found out that my changes are not good enough and indeed I need to update selenium to: <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.3.0</version> </dependency>
When I’m trying to run the the server for appium I get error and serivce.start is failling: public static void startService(){ AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder(); appiumServiceBuilder.usingAnyFreePort() .withIPAddress(“127.0.0.1”) .withAppiumJS(new File(appiumJSPath)) .withArgument(GeneralServerFlag.LOG_LEVEL,“warn”); // .withLogFile(new File(System.getProperty(“user.dir”) + “/target/resources/appium_server_logs” + Thread.currentThread().getId())); service_builder = AppiumDriverLocalService.buildService(appiumServiceBuilder); service_builder.start(); } Can you please assist?