iI am not able to dorun my automation testing with appiumAppium server by using eclipseEclipse with selenium. Please help me to resolve this problem asap i have shared below Eclips error and Appium server logs alsoSelenium. i have shared eclipsThe error also as belowI get is:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details.
java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to Eclipsuse error:the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permissionThe code I am trying to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS
My program on Eclipsrun is given below:
package tests;
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 StartChrome {
package tests;
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 StartChrome {
public static void main(String[] args) {
// Set the Desired Capabilities
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "My Phone");
caps.setCapability("udid", "7970dc54"); // Give Device ID of your mobile phone
caps.setCapability("platformName", "Android");
caps.setCapability("platformVersion", "9 PKQ1.180904.001");
caps.setCapability("appPackage", "com.android.vending");
caps.setCapability("appActivity", "com.google.android.finsky.activities.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());
}
}
}
}