Getting error while running script on eclipse for appium Android mobile automation.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Hi,
I was running the script as java application in eclipse for appium mobile automation:
package Mobiletest;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
public class samplemobilescript {
static AndroidDriver<MobileElement> driver;
public static void main(String[] args) throws MalformedURLException {
DesiredCapabilities cap=new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Samsung");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "5.0");
cap.setCapability(MobileCapabilityType.APP, "/USER PROFILES/Desktop/Newfolder/selendroid-test-app.apk");
driver=new AndroidDriver<>(new URL("http://0.0.0.0:4723/wd/hub"), cap);
driver.findElement(By.id("test")).click();
}
}
Following is the error I'm getting.:
Exception in thread "main" java.lang.NoSuchMethodError: org.openqa.selenium.remote.http.HttpClient$Factory.createDefault()Lorg/openqa/selenium/remote/http/HttpClient$Factory;
at io.appium.java_client.remote.AppiumCommandExecutor.(AppiumCommandExecutor.java:93)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:95)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:94)
at Mobiletest.samplemobilescript.main(samplemobilescript.java:23)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Mobiletest.samplemobilescript.main at line 23 and the AppiumCommandExecutor constructor at AppiumCommandExecutor.java:93, then inspect the Selenium and Appium client dependencies used by the Eclipse project. The issue is done when the script creates the AndroidDriver without the reported NoSuchMethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100