user3780373
user3780373

Reputation:

An unknown server-side error occurred while pro the command. Original error: Appium Settings app is not running after 5000ms

I am trying to do a small POC for automating the test cases for a desktop eCommerce website to run on real mobile device(mobileWeb) browser(chrome) using the combination of Selenium and Appium using the latest Eclipse (Version: 2024-06 (4.32.0)) and recent JDK 21.0.3

Environment:

*selenium-java==>4.21.0 *java-client ==>9.2.3 *appium server ==>v2.10.3 *Desktop OS/version used to run Appium: Microsoft Windows Server 2022 Standard(10.0.20348 Build 20348) *Node.js version: v20.14.0 *Mobile platform/version under test: Android 14 *Real device: Samsung Galaxy S21 FE 5G

Code:

    import java.net.MalformedURLException;
    import java.net.URL;
    
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.chrome.ChromeOptions;
    import org.testng.Assert;
    import org.testng.annotations.BeforeMethod;
    import org.testng.annotations.Test;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.AutomationName;

public class AndroidChromeTest {
    WebDriver driver;


    @BeforeMethod
    public void setUp() throws MalformedURLException {
        ChromeOptions options = new ChromeOptions();
//      AppiumOptions options = new AppiumOptions();
        URL url = new URL("http://localhost:4723/");
        options.setPlatformName("Android");
        options.setAndroidDeviceSerialNumber("R5CW71PYTHE");
        options.setBrowserVersion("125");
        options.setCapability("appium:automationName",AutomationName.ANDROID_UIAUTOMATOR2);
//      options.setCapability("automationName","UIAutomator2");
        driver = new AndroidDriver(url, options);
    }

    @Test
    public void verifyTitle() throws MalformedURLException {
        driver.get("https://home.zcommerceqa.zekelman.com/zekelmanstorefront/home/en/USD/login");
        Assert.assertEquals(driver.getTitle(), "Login | Z-Commerce");
    }
}

Exception stack traces

Build info: version: '4.21.0', revision: '79ed462ef4'
System info: os.name: 'Windows Server 2022', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.3'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[Capabilities {appium:automationName: UIAutomator2, browserName: chrome, browserVersion: 125, goog:chromeOptions: {androidDeviceSerial: R5CW71PYTHE, args: [], extensions: []}, platformName: ANDROID}]}]
Capabilities {appium:automationName: UIAutomator2, browserName: chrome, browserVersion: 125, goog:chromeOptions: {androidDeviceSerial: R5CW71PYTHE, args: [], extensions: []}, platformName: ANDROID}
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
    at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
    at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:176)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:237)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
    at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:270)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:161)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:91)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:103)
    at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:109)
    at com.zk.mobile.device.test.AndroidChromeTest.setUp(AndroidChromeTest.java:31)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
    at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:71)
    at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:400)
    at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:333)
    at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:833)
    at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:600)
    at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:230)
    at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:63)
    at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:992)
    at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:203)
    at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:154)
    at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:134)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
    at org.testng.TestRunner.privateRun(TestRunner.java:739)

Appium Server Logs:

enter image description here

Upvotes: 0

Views: 222

Answers (0)

Related Questions