question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with Updating from appium for windows 1.8.1 to appium 1.22.3

See original GitHub issue

The 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:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ItaySassoncommented, Aug 14, 2022

@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.

0reactions
ItaySassoncommented, Aug 16, 2022

@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>

   and io.appium to:
    <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>8.1.1</version>

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating from appium 1.8.1 to appium 1.22.3 - Stack Overflow
I'm using Appium for desktop to test windows application with my Java code. I decided to update Appium from 1.8.1 to 1.22.3.
Read more >
Downloads - Appium
Appium's desktop app supports OS X, Windows and Linux. Appium-Desktop for OSX, Windows and Linux. We're open for discussion and would love to...
Read more >
Supported Platforms - Appium
This document is designed to make explicit the level of support and requirements for each of these, or guide each driver to proper...
Read more >
Troubleshooting - Appium
Update the app and restart. If you get a message saying the app can't be updated, re-download it from appium.io. If you're running ......
Read more >
Using Chromedriver - Appium
When Appium is installed it needs to download Chromedriver, so there is the possibility that there could be network problems that make the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found