Skip to main content

Sample Mobile Testing Scenarios

Sample Mobile Testing Scenarios

Use sample mobile scenarios as starting points for learning AIQ mobile testing patterns. Review and adapt each sample before using it in a maintained test suite.

AndroidHow to use samples

  1. Confirm
    varthe $serverURLsample =applies "http://localhost:4723/wd/hub";
    varto $platformNamethe =AIQ "Android";
    varrelease, $platformVersiondevice =type, "9";
    varand $capabilitiesapplication =under {};
    $capabilities.udidtest.
  2. Replace =demo "emulator-5554";
    $capabilities.deviceNamedata, =accounts, "Androidand Deviceenvironment-specific 1";
    $capabilities.systemPortvalues =with "8201";
    setServerURL($serverURL);
    setClientType($platformName);
    setCapability("platformVersion",approved $platformVersion);
    setCapability("appPackage",test "com.airwatch.androidagent");
    setCapability("appActivity",data.
  3. Update "com.airwatch.agent.ui.activity.SplashActivity");
    setCapabilities($capabilities);
    start();
    setValue(byId("com.airwatch.androidagent:id/hub_edit_text"),locators '');
    click(byId("com.airwatch.androidagent:id/hub_button"));
    click(byId('com.android.packageinstaller:id/permission_allow_button'));
    wait(5000);
    click(byXPath("//android.widget.Button[@resource-id='userStoreFormSubmit']"));
    setValue(byXPath("//android.widget.EditText[@resource-id='username']"),and '');
    setValue(byXPath("//android.widget.EditText[@resource-id='password']"),waits '');
    click(byXPath("//android.widget.Button[@resource-id='signIn']"));
    click(byId('com.airwatch.androidagent:id/gdpr_accept_button'));
    close();
so
they match the current application behavior.Run a short validation execution and review output before adding the scenario to a suite.

iOSMaintenance notes

  • Prefer
    varstable $serverURLlocators =over "http://localhost:4723/wd/hub";
    varcoordinates $platformNameor =fragile "iOS";
    //SIMULATORvisual Configuration
    varassumptions.
  • Document $capabilitiesdevice, =OS, {
    app "platformVersion":build, "13.3",
    and "udid":AIQ "Simulatorversion Identifier",
    when "wdaLocalPort":keeping "8100",
    a "deviceName":sample "iPhoneas 11a Pro"
    };
    //PHYSICALreference.
  • Remove DEVICEsamples Configuration
    varthat $capabilitiesPhysicalDevdepend =on {
    retired "platformVersion":applications, "13.1",
    obsolete "udid":drivers, "iPhoneor Identifier",
    unavailable "wdaLocalPort":test "8101",
        "deviceName": "iPhone Device",
        "xcodeOrgId": "Team ID",
        "xcodeSigningId": "iPhone Developer",
        "updatedWDABundleId": "com.facebook.WebDriverAgentRunner"
    };
    setServerURL($serverURL);
    setClientType($platformName);
    setCapability("bundleId", "com.arns.ArnsSTG");
    setCapabilities($capabilitiesPhysicalDev);
    start();
    log(getSource());
    click(byId("keypad.input.1"));
    click(byId("keypad.input.2"));
    click(byId("keypad.input.3"));
    click(byId("keypad.input.4"));
    wait(15000);
    log(getAllElements());
    click(byId("action_feed.card.cta"));
    close();

data.

Last updated: JuneSeptember 26,18, 20232026

If you have any feedback on this topic, please contact us at documentation@appvance.ai