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
Appium Server: Installed and running (Appium 2.x / 3.x).
Device / Emulator:
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:
In the Rapise toolbar, click the ellipsis button near the Browser dropdown (or go to Settings > Selenium).
Click Create to create New or Duplicate to clone Existing profile (e.g., name it Android_Chrome or iOS_Safari).
Configure the profile settings:
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.
In the Rapise Object Files tree, open Common.js.
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
Ensure your Appium Server is running.
(Tip for Android: Start Appium with appium --allow-insecure *:chromedriver_autodownload so it matches the browser automatically).
Ensure your Android Emulator or iOS Simulator is launched.
In Rapise, select your profile (Android_Chrome or iOS_Safari) from the top toolbar browser dropdown.
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.