Overview

In Rapise, web tests are designed to be browser-agnostic. By utilizing Appium as a WebDriver endpoint, Rapise can send standard Selenium/W3C commands directly to mobile browsers on Android and iOS devices or emulators.


Prerequisites

  1. Appium Server: Installed and running (Appium 2.x / 3.x).

  2. Device / Emulator:

    • For Android: Android Studio emulator or real device running Google Chrome.

    • For iOS: macOS host with Xcode Simulator or real device running Safari.


Step 1: Create WebDriver Browser Profiles in Rapise

In modern versions of Rapise, you do not need to configure complex mobile profiles for web testing. Instead, configure a standard Selenium - WebDriver profile pointing to your Appium server:

  1. In the Rapise toolbar, click the ellipsis button near the Browser dropdown (or go to Settings > Selenium).

  2. Click Create to create New or Duplicate to clone Existing profile (e.g., name it Android_Chrome or iOS_Safari).

  3. Configure the profile settings:

    • URL / Server: http://127.0.0.1:4723/ (or the IP address/hostname of your Mac if running iOS tests)

    • Browser Name: Set strictly to Chrome (for Android) or Safari (for iOS).

      ⚠️ Important: Do not set browserName to Android, iPhone, or iPad. Modern Appium drivers require standard W3C browser names (Chrome or Safari).


Step 2: Implement the Capabilities Callback in Common.js

Because Appium requires specific platform parameters and vendor-prefixed capabilities (such as appium:automationName), Rapise uses the GetWebDriverNonProfileCapabilities callback function to supply these parameters dynamically at runtime.

  1. In the Rapise Object Files tree, open Common.js.

  2. Add the following function:

function GetWebDriverNonProfileCapabilities(profile)
{
    var caps = {};
    var _profile = profile.toLowerCase();
    
    if (_profile.indexOf("android") != -1)
    {
        caps["platformName"] = "Android";
        caps["platformVersion"] = "13.0";            // Adjust to your Android version
        caps["deviceName"] = "Android Emulator";      // Adjust to your device/AVD name
        caps["browserName"] = "Chrome";

        caps["appium:automationName"] = "UIAutomator2";
        caps["appium:newCommandTimeout"] = "600";
    }
    else if (_profile.indexOf("ios") != -1)
    {
        caps["platformName"] = "iOS";
        caps["platformVersion"] = "17.0";            // Adjust to your iOS/Simulator version
        caps["deviceName"] = "iPhone 15";             // Adjust to your target device model
        caps["browserName"] = "Safari";
        
        caps["appium:automationName"] = "XCUITest";
        caps["appium:newCommandTimeout"] = "600";
    }
    
    return caps;
}

Note: Customize platformVersion and deviceName inside the function to match your specific emulator or connected device.


Step 3: Run the Test on the Mobile Device

  1. Ensure your Appium Server is running.
    (Tip for Android: Start Appium with appium --allow-insecure *:chromedriver_autodownload so it matches the browser automatically).

  2. Ensure your Android Emulator or iOS Simulator is launched.

  3. In Rapise, select your profile (Android_Chrome or iOS_Safari) from the top toolbar browser dropdown.

  4. Click Play.

Rapise will connect to Appium, launch the mobile browser on your device/emulator, navigate to the target URL, and execute the recorded web test.