2

Error: Duplicate class org.openqa.selenium.SearchContext found in modules jetified-java-client-7.3.0.jar (java-client-7.3.0.jar) and jetified-selenium-server-standalone-3.141.59.jar (selenium-server-standalone-3.141.59.jar)

Please check my code in android studio for automation with selenium jar and aapium

package com.example.babilok;

import java.net.MalformedURLException;

import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

public class MainActivity {

    public static void main(String[] args) {

        // Set the Desired Capabilities
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("deviceName", "Redmi");
        caps.setCapability("udid", "e6c7eed472e00d89"); // Give Device ID of your mobile phone
        caps.setCapability("platformName", "Android");
        caps.setCapability("platformVersion", "9 PKQ1.190319.001");
        caps.setCapability("appPackage", "com.example.babilok");
        caps.setCapability("appActivity", "com.example.babilok.MainActivity");
        caps.setCapability("noReset", "true");

        // Instantiate Appium Driver
        try {

            AppiumDriver<MobileElement> Driver = new AndroidDriver<MobileElement>(new URL("http://0.0.0.0:4723/wd/hub"),
                    caps);

        } catch (MalformedURLException e) {
            System.out.println(e.getMessage());
        }
    }
}

Please check my android all jar files that i embed in image

11
  • What is the error? Commented Mar 6, 2020 at 15:48
  • Your code looks okey. please share the error in comments to check the details Commented Mar 8, 2020 at 17:07
  • Hi @GregBurghardt please check error as below: Duplicate class org.openqa.selenium.SearchContext found in modules jetified-java-client-7.3.0.jar (java-client-7.3.0.jar) and jetified-selenium-server-standalone-3.141.59.jar (selenium-server-standalone-3.141.59.jar) Commented Mar 9, 2020 at 5:12
  • Hi @HemantVarhekar please check my above comment for error Commented Mar 9, 2020 at 5:27
  • Please edit your question and add this information. It gets lost in comments too easily. Commented Mar 9, 2020 at 9:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.