While trying to run a Java Appium Test on Sauce labs, I am getting org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. error.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=http://saucelabs.com/souce-storage/FilePursuit.apk, platformVersion=4.4, appiumVersion=1.5.3, browserName=, deviceOrientation=portrait, platformName=Android, deviceName=Samsung Galaxy S4 Emulator}], required capabilities = Capabilities [{}] Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800' System info: host: 'CJL-8641', ip: '10.11.1.245', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201' Driver info: driver.version: AndroidDriver at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:87) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:111) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72) at SauceLabsAppiumDemo.main(SauceLabsAppiumDemo.java:34)
public static final String USERNAME="XXXX"; public static final String ACCESS_KEY="XXXX"; public static final String URL="https://" + USERNAME + ":" + ACCESS_KEY + "@ondemand.saucelabs.com:443/wb/hub";
private static AndroidDriver<MobileElement> driver;
public static String id;
AppiumDriverLocalService service;
public static void main(String args[]) throws MalformedURLException{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("deviceName", "Samsung Galaxy S4 Emulator");
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("app", "http://saucelabs.com/souce-storage/FilePursuit.apk");
capabilities.setCapability("browserName", "");
capabilities.setCapability("deviceOrientation", "portrait");
capabilities.setCapability("appiumVersion", "1.5.3");
driver = new AndroidDriver<>(new URL(URL), capabilities);
driver.quit();
//System.out.println(we.isDisplayed());
//System.out.println(we.isEnabled());
//System.out.println(we.getSize().height+" "+we.getSize().width);
//we.click();
// driver.findElementById("net.one97.paytm:id/first_item_image").click();
}
Aucun commentaire:
Enregistrer un commentaire