iOS automation with appium
Home Setting up Appium environment in Mac OS X Installing Appium app on Mac OS Appium doctor Simulators in XCode Capabilities for iOS automation Inpsecting the elements from Appium inspector Automating Native iOS app Automating Hybrid app Automating Web app Hooking up appium with Selenium gridHybrid app automation in iOS automation using appium
We can automate the hybrid app very easily using Appium. Hybrid app contains native control as well as web controls. You need to switch the context to web control within app and then we can use the normal Selenium webdriver API to perform the operations. To auto switch the context to web, you can pass below capability.
capabilities.SetCapability(“autoWebview”, true);
Otherwise you can use below code to find all contexts within app and switch to it.
System.out.println("Context count " + driver.getContextHandles().size());
for (Object contextName : driver.getContextHandles()) {
System.out.println("Context Name -> " + contextName);
if (contextName.toString().toUpperCase().contains("WEBVIEW")){
driver.context(contextName.toString());
System.out.println("Switched to WebView Context");
}
}
driver.get("https://www.softpost.org");
driver.close();
//Switch back to Native app
driver.context("NATIVE_APP");
Web development and Automation testing
solutions delivered!!