Giter VIP home page Giter VIP logo

appcenter-test-appium-java-extensions's Introduction

Appium Java Extensions

This project provides extensions for producing test reports for JUnit-based Appium tests in Visual Studio App Center. Visit our docs for instructions on how to convert and run your existing Appium test suite in App Center.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

appcenter-test-appium-java-extensions's People

Contributors

greysteil avatar jhutchings1 avatar john7doe avatar jraczak avatar kamstrup avatar konstantin-bobkov avatar krukow avatar microsoft-github-policy-service[bot] avatar skovsboll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

appcenter-test-appium-java-extensions's Issues

cross platform label() API

There has been user requests for cross platform APIs for calling label() on a driver.

Maybe we should make the enhanced ios/android drivers implement a LabellingDriver interface and have label(String) be part of that?

Alternatively we could do a full facade that wraps a driver and exposes a label(String) method, dispatching to one of the enhanced drivers by simple instanceof checking.

Neither one is super nice, but we wouldn't want to break API either...

How to programmatically switch between ios and android enhanced driver

When I write appium tests, it looks like I can only declare driver as either an EnhancedAndroidDriver type, or an EnhancedIOSDriver type. I want to run a simple test in a single file that will run on both platforms, but it seems I must choose either android or ios for that file to run on. How do I avoid duplicating all my test files? I am using react native and my app is basically identical on both platforms. I have done something similar with the regular AppiumDriver.

Any suggestions to programmatically switch which 'EnhancedIOS/AndroidDriver' the variable driver refers to in Java??

With the regular AppiumDriver, I can do this:

private static AppiumDriver<MobileElement> driver;

public AppiumDriver<MobileElement> getDriver() throws IOException {
    if (PLATFORM_NAME.equals("Android")) {
       driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    } else if (PLATFORM_NAME.equals("iOS")) {
       driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    }
    return driver;
}

But it seems impossible to take this approach with the Enhanced drivers because they don't share a common type. Please advise!

Visual Studio Code's Java Compiler Not Showing Certain Errors

When running Java code I have noticed that some compile time errors will not be displayed. For example, the following code should throw an error, "HashMap<Integer, Integer> hashMapName = new HashMap<Integer, String>();" Instead of seeing, "Unresolved compilation problems:
Type mismatch: cannot convert from HashMap<Integer,Integer> to HashMap<Integer,String>
The method put(Integer, String) in the type HashMap<Integer,String> is not applicable for the arguments (int, int)" The compiler displays, "Exception in thread "main" java.lang.Error: Unresolved compilation problem:

    at Test.main(Test.java:8)" If I want to see the error message then I have to read the class file in order to determin what the error is and where it is located. I was able to reproduce the bug in a small and simple Java file. I noticed that the bug shows up when I declare the like, "HashMap<dataTypeA, dataTypeB> name = new HashMap<dataTypeC, dataTypeD>" Where dataType A - D could be any data type I want it to be. The bug only occors when dataTypeC is different from dataTypeA and or dataTypeD is differnt from dataTypeB.

getting error while uploading tests to target/upload folder to push it further to appcenter

Hi,

i have followed the steps mentioned to run test cases in app - center https://docs.microsoft.com/en-us/appcenter/test-cloud/frameworks/appium/
but getting issues while running command
mvn -DskipTests -P prepare-for-upload package

added screenshot as well
image

Below is the pom.xml given

`


4.0.0

<groupId>org.example</groupId>
<artifactId>appiumappcenter</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <version>6.14.3</version>
</dependency>
    <dependency>
        <groupId>com.microsoft.appcenter</groupId>
        <artifactId>appium-test-extension</artifactId>
        <version>1.5</version>
    </dependency>


</dependencies>

<repositories>
    <repository>
        <id>jcenter</id>
        <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>


<profiles>
<profile>
    <id>prepare-for-upload</id>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- configure the plugin here -->
                            <outputDirectory>${project.build.directory}/upload/dependency-jars/</outputDirectory>
                            <useRepositoryLayout>true</useRepositoryLayout>
                            <copyPom>true</copyPom>
                            <addParentPoms>true</addParentPoms>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-help-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <id>generate-pom</id>
                        <phase>package</phase>
                        <goals>
                            <goal>effective-pom</goal>
                        </goals>
                        <configuration>
                            <output>${project.build.directory}/upload/pom.xml</output>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-testclasses</id>
                        <phase>package</phase>
                        <goals>
                            <goal>testResources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/upload/test-classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>
                                        ${project.build.testOutputDirectory}
                                    </directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</profile>
</profiles>
`

however if i add appium dependency

io.appium
java-client
6.1.0

then it shows a different error
image

please let me know how can this issue be resolved

Request: Update to java-client 6.1.0 (from 6.0.0) for bug fixes.

Currently appcenter appium extension is using java-client 6.0.0.

It has a bug that is causing me lots of problems. Because of usage with Sleep and it's apparently fixed in java-client 6.1.0 (and newer)

Can you update the version for 1.6-snapshot before it's released?
https://mvnrepository.com/artifact/io.appium/java-client

Thanks!

more info:

appium/appium#8702
https://github.com/appium/appium-desktop/issues/566
appium/java-client#947

io.appium
java-client
6.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.