How To Automate iOS App Using Appium

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • NodeJs-Cucumber-Selenium

    Run test automation on cloud with Cucumber.js and LambdaTest. This is a sample repo to help you execute Cucumber.js framework based test scripts in parallel with LambdaTest automation testing cloud

  • import io.appium.java_client.AppiumDriver; import io.appium.java_client.MobileBy; import io.appium.java_client.MobileElement; import io.appium.java_client.ios.IOSDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.net.URL; public class vanilla_ios { public static String userName = System.getenv("LT_USERNAME") == null ? "sidharth****" //Add username here : System.getenv("LT_USERNAME"); public static String accessKey = System.getenv("LT_ACCESS_KEY") == null ? "********" //Add accessKey here : System.getenv("LT_ACCESS_KEY"); public static final String URL = "https://" + userName + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"; public static IOSDriver driver = null; public static void main(String[] args) throws Exception { try { DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability("platformVersion", "15"); caps.setCapability("deviceName", "iPhone 12"); caps.setCapability("isRealMobile", true); caps.setCapability("app", "******"); //Enter your app url caps.setCapability("platformName", "iOS"); caps.setCapability("build", "Java Vanilla - iOS"); caps.setCapability("name", "Sample Test Java"); caps.setCapability("devicelog", true); caps.setCapability("network", true); driver = new IOSDriver(new URL("https://" + userName + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"), caps); Thread.sleep(2000); //Opens the browser MobileElement browser = (MobileElement) driver.findElementByAccessibilityId("Browser"); browser.click(); Thread.sleep(3000); WebDriverWait el7 = new WebDriverWait(driver, 30); el7.until(ExpectedConditions.elementToBeClickable(MobileBy.id("url"))); driver.findElementById("url").sendKeys("https://www.lambdatest.com/"); //Clicks on the text box WebDriverWait el = new WebDriverWait(driver,90); MobileElement el4 = (MobileElement) driver.findElementByAccessibilityId("find"); el.until(ExpectedConditions.elementToBeClickable(el4)); el4.click(); el4.sendKeys("Lambdatest"); //((JavascriptExecutor) driver).executeScript("lambda-status=passed"); driver.quit(); } catch (Exception t) { System.out.println(t); driver.quit(); } } }

  • HomeBrew

    🍺 The missing package manager for macOS (or Linux)

  • It is a package management software, and to install, follow the instructions on this page: https://brew.sh/.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts