Need To Point Test Case On Specific Appium Node In Selenium Grid


I am using Selenium grid to execute parallel tests on appium servers launched at separate ports. It works great at the moment but there are some tests that I need to point to a specific device which I am failing to do at the moment. Following are the things I have tried:-

  1. I have tried using applicationName capability which appium node rejects saying unidentified capability

  2. I have tried using browserName to get the specified which does not work.

Please suggest

For your

  1. There is no applicationName capability. Can you try with “app”, if you are providing “.apk” file path, else use “appPackage” and “appActivity”.
    Here is a sample code:

    File objAppPath=new File(“your apk file path”);
    DesiredCapabilities capabilities=new DesiredCapabilities();
    capabilities.setCapability(“deviceName”,strDeviceName); //Your device name or emulator name
    //You can point to your app in two ways:
    //1. Specifying app path like below
    capabilities.setCapability(“app”, objAppPath.getAbsolutePath());
    //2. Else specify both appPackage and appActivity
    capabilities.setCapability(“appPackage”, “your app pkg name”);
    capabilities.setCapability(“appActivity”, “Activity name that you wanted to start”);

  2. Which browser you are referring to? Chrome browser or native browser that comes up with the mobile?

1 we can use applicationName to point to specific machines.Refer
2 I am trying to run selenium tests on android application. Like I said capabilities are running fine when I am running tests on Grid, but pointing a specific node for test case is I am not able to do.