
Gain a practical overview of artificial intelligence, from data-trained systems that think and learn like humans to AI writing, image recognition, and automated testing across everyday apps.
Explore how a large language model works as a brain for AI, trained on vast data to translate, answer, summarize, or generate images, with GPT-4, Claude 3, Gemini, and Lamda.
Explore how generative AI differs from traditional AI by creating new content, including code, documents, images, audio, and video, based on massive training data.
Explore how AI memory stores, retains, and recalls past interactions, distinguishing short-term memory from long-term memory and enabling chatbots to recall conversations across sessions.
Explore how an AI agent, a software program built on artificial intelligence, achieves a goal by using tools, making independent decisions, and coordinating with other agents.
Explore LangChain and LangGraph, explaining retrieval augmented generation with a vector database, data loading, chunking, embedding, and storing for LLMs; visualize AI agents as a nodes-edges-states-checkpoint line graph workflow.
Learn how the model context protocol (MCP) standardizes how an AI model communicates with tools, APIs, databases, and services, acting as a bridge and adapter to enable reusable, scalable integrations.
Learn the human in the loop concept, when AI should seek human approval, and how guardrails and prompts curb hallucinations to prevent unsafe or wrong actions.
Understand fine tuning as adjustments to an AI agent’s knowledge and interaction style, enabling role specific conversations for customers, staff, and executives, and contrast it with RAG in banking contexts.
Learn prompt engineering by defining prompts with clear context to avoid hallucinations and guide AI responses; see how precise inputs shape plans, such as trip bookings.
Set an LLM context via a text file to act as a tester, then generate manual or automation test cases from user stories, criteria, and UI mockups.
Define automated test context with a manual context file and prompt-driven instructions to guide ChatGPT through a generic login flow, covering positive and negative test scenarios.
Explore zero-shot, one-shot, and few-shot prompts and chain of thought reasoning in automation testing, learning how context files and clear instructions drive accurate LLM outputs.
Contrast ChatGPT, Copilot, and Cursor; ChatGPT is a general purpose AI, while Copilot and Cursor are coding assistants, with Cursor offering deeper integration for your automation testing projects.
Discover how OpenAI powers ChatGPT and Copilot with GPT models, explores DALL-E image generation, and develops public principles and protocols for advancing AI.
Discover how to create ai-powered automation with n8n, building no-code workflows to automate emails, data handling, and ai-enabled agents during a 14-day trial.
Sign up on platform.openai.com, create a new API key named 'my first API key', copy and paste it to connect AI agents used in your automation projects.
Create a simple n8n workflow that connects Gmail and Google Drive, reads data from Google Sheets, and uses an ai agent to trigger an email on matches.
Create an n8n workflow that reads a sheet, checks for a user, and sends email to the model-defined recipient at runtime, with OpenAI integration and error handling for invalid addresses.
Read a Google Sheets based n8n workflow that triggers background verification emails when candidate status is 'S', pulling data from sheet two and sending updates to multiple recipients.
Demonstrates automating a jira-based testing workflow by reading from excel to create test cases or defects, and integrating zephyr test management with a jira cloud setup.
Learn to build an n8n workflow that pulls new defects from a data sheet and creates Jira issues, including configuring credentials and debugging connection issues with Jira cloud.
Utilize an n8n workflow to create Jira bugs from sheet data, validating credentials and URLs, and automatically generate defects for new items in the Lucky Trainings project.
Enable a public chat in an n8n workflow by generating a shareable url and mapping sheet three to create defects in zero based on status and defect columns.
Discover how OpenAI tokens are the fundamental input units, with about four characters per token, guiding prompts, processing time, cost, and budget and rate limits on trial accounts.
Explore building a Chrome extension for record and playback using an ai powered code editor, generating Playwright TypeScript or Selenium Java scripts with prompt-driven setup.
Create a chrome extension for record and playback that generates Playwright TypeScript or Selenium Java scripts from captured actions, with a downloadable test script.
Develop an OTP shield mobile app that monitors SMS, calls, and WhatsApp for OTP requests, warns users, and blocks APK delivery while guiding secure signup.
Jump into apm concepts for Appium 3 mobile automation and explore AI driven implementation, including a new end section on using GitHub Copilot to write code for our apm framework.
configure the mac for appium automation by installing node.js and java, setting up android studio and xcode, and updating bash profile and jet profile to configure java home.
Install android studio on mac, create android emulators (virtual devices), and configure android home and sdk paths in bash and jet profiles, then install Xcode for mac development.
Set up Windows prerequisites for Appium by installing node.js and java (jdk 21), configuring JAVA_HOME and PATH, and verifying installations before moving to Android Studio setup.
Connect a real Android phone to your laptop via USB, install visor to mirror the screen, enable developer options and USB debugging, then verify with adb devices.
Links to download app files:
1. https://github.com/saucelabs/sample-app-mobile/releases
2. https://github.com/webdriverio/native-demo-app/releases
Identify the package name and activity name of an android app using an apk info tool, then copy and paste the activity into your automation project.
Start the APM server with the inspector plugin, connect via the inspector URL, and explore features like saving server details, the capability builder, saved capabilities, and session inspector.
Configure a project with Apache Maven by managing dependencies in pom.xml, adding jar files from the central repository, and setting up maven home and environment variables.
Learn to create an Android driver by passing platform name and version, device name, app path, and package and activity details, with no reset and UIAutomator2.
Learn to automate form handling on Android with Appium by using implicit waits, custom XPath strategies, and content descriptions to interact with text fields, switches, dropdowns, and alert pop-ups.
Learn to capture the iOS simulator udid in Xcode by selecting manage run destinations and the simulator tab; use the identifier as the udid in your automation script.
Learn to write a Java program with the Appium Java client to launch the UI catalog app on an iOS simulator, configuring a Maven project, test options, and driver setup.
Master iOS alert handling in a ui kit catalog app with appium by establishing a session using udid and app path, then interact with alerts via accessibility ids.
Explore how to locate and toggle iOS switches in a UI kit catalog app using Appium with an accessibility id and XPath, including waiting and app termination.
Retrieve the x and y coordinates and screen size in Appium using driver.manage.window.getPosition and driver.getSize, then print x, y, height, and width, and compute the center as width/2 and height/2.
Learn how to calculate the center of a UI element from its x and y coordinates along with its width and height, then perform a click at the center.
Capture the x and y coordinates, height and width of a login button, calculate the center with half-width/half-height, and print the results for center-based taps in Appium 2.X mobile automation.
Learn to obtain an element’s center coordinates by computing x, y, height, and width using the rect method and get x, get y, get height, and get width.
Examine the W3C Appium gestures overview, focusing on pointer input, sequence, and perform to execute taps, long presses, and scrolls with a virtual finger.
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class SauceLabsLaunch {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setAutomationName("UiAutomator2")
.setAppActivity("com.swaglabsmobileapp.MainActivity")
.setApp("/Users/lucky/Downloads/app/Android/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
AndroidDriver driver = new AndroidDriver(
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(4500);
Dimension d = driver.manage().window().getSize();
int startX= (int) (d.getWidth() * 0.5);
int startY= (int) (d.getHeight() * 0.5);
int endX = startX;
int endY = (int) (d.getHeight() * 0.2);
PointerInput swipeUp = new PointerInput(PointerInput.Kind.TOUCH,"swipeUp");
Sequence sequence = new Sequence(swipeUp,1);
sequence.addAction(swipeUp.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,startY));
sequence.addAction(swipeUp.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence.addAction(swipeUp.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,endY));
sequence.addAction(swipeUp.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence));
Thread.sleep(5000);
PointerInput swipeDown = new PointerInput(PointerInput.Kind.TOUCH,"swipeDown");
Sequence sequence1 = new Sequence(swipeDown,1);
sequence1.addAction(swipeDown.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,endY));
sequence1.addAction(swipeDown.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence1.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence1.addAction(swipeDown.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,startY));
sequence1.addAction(swipeDown.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence1));
Thread.sleep(16500);
driver.quit();
}
}
Automate an iOS end-to-end swag labs flow with Appium 3 AI: login, add to cart, checkout, fill the form, finish, and logout, using accessibility ids, xpaths, and coordinate taps.
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll1 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(3500);
// String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
// ".text(\"WebView\"));";
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
".textContains(\"Web\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
driver.findElement(AppiumBy.xpath("//*[@text='WebView']")).click() ;
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll2 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(3500);
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
".text(\"Lists\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
driver.findElement(AppiumBy.xpath("//*[@text='Lists']")).click() ;
Thread.sleep(1000);
driver.findElement(AppiumBy.xpath("//*[@text='01. Array']")).click() ;
Thread.sleep(1000);
// String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
// ".text(\"Swiss\"));";
String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true)).setAsVerticalList()"+".scrollIntoView(new UiSelector()" +
".text(\"Swiss\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext1));
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll3 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(3500);
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
".text(\"Tabs\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
driver.findElement(AppiumBy.xpath("//*[@text='Tabs']")).click() ;
Thread.sleep(1000);
driver.findElement(AppiumBy.xpath("//*[@text='5. Scrollable']")).click() ;
Thread.sleep(1000);
String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true)).setAsHorizontalList()"+".scrollIntoView(new UiSelector()" +
".text(\"TAB 11\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext1));
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll5 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(1000);
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
".text(\"Lists\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
driver.findElement(AppiumBy.xpath("//*[@text='Lists']")).click() ;
Thread.sleep(1000);
driver.findElement(AppiumBy.xpath("//*[@text='01. Array']")).click() ;
Thread.sleep(1000);
String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true)).setMaxSearchSwipes(1)"+".scrollIntoView(new UiSelector()" +
".text(\"Feta\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext1));
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll4 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(3500);
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true)).scrollForward()";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
Thread.sleep(3500);
String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true)).scrollBackward()";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext1));
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class AdvancedScroll6 {
@Test
public void testOne() throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setUdid("R9ZR80BT7LB")
.setAutomationName("UiAutomator2")
.setApp("/Users/lucky/Downloads/app/Android/ApiDemo_1.1_Apkpure.apk");
options.setCapability("noReset", true);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723"), options
);
Thread.sleep(3500);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(60));
driver.findElement(AppiumBy.xpath("//*[@text='Views']")).click() ;
Thread.sleep(3500);
String scrolabletext = "new UiScrollable(new UiSelector().scrollable(true))"+".scrollIntoView(new UiSelector()" +
".text(\"Lists\"));";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext));
driver.findElement(AppiumBy.xpath("//*[@text='Lists']")).click() ;
Thread.sleep(1000);
driver.findElement(AppiumBy.xpath("//*[@text='01. Array']")).click() ;
Thread.sleep(1000);
String scrolabletext1 = "new UiScrollable(new UiSelector().scrollable(true)).scrollToEnd(20)";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext1));
Thread.sleep(1000);
String scrolabletext2 = "new UiScrollable(new UiSelector().scrollable(true)).scrollToBeginning(20)";
driver.findElement(AppiumBy.androidUIAutomator(scrolabletext2));
Thread.sleep(6500);
driver.quit();
}
}
Execute parallel Android and iOS tests by configuring the pom.xml surefire plugin, running an apm server on two ports (4723 and 4724), and using a parallel test runner.
learn to integrate Appium test scripts with Saucelabs cloud, including creating accounts, uploading apps, configuring desired capabilities, selecting devices, and reviewing logs, videos, and test results.
Explore how the no reset capability preserves app data across sessions, preventing cache clearance when Appium establishes a new session and launches the app.
Create and configure a Jenkins job to run Maven test scripts from the command prompt, with a custom workspace and mvn compile and mvn test.
Dive into the page factory framework with Cucumber and TestNG, detailing config-driven Android and iOS driver setup, web element usage, and test listener integration for robust testing.
Explore implementing a page factory framework with cucumber and testng in appium for Android and iOS, configuring capabilities, launching source demo, and building feature files, page objects, and step definitions.
Create a login page with the page factory framework, map cucumber step definitions to page objects, and implement an android login flow using testng and xpath locators.
Develop and wire page objects for a mobile app using page factory, with Cucumber and TestNG; build home, cart, and checkout flows end-to-end.
Navigate the src test resources, including features and an optional data folder, and enable data driven testing with Excel data, configuring browser, URL, environments, and Android and iOS capabilities.
Upgrade the page factory framework for mobile automation by refreshing apm java, selenium, testng, and cucumber versions, enabling iOS code with copilot, and performing pom.xml updates plus project cleanup.
Learn how to define a context file with strict rules for AI-driven page factory generation in Appium 3 mobile automation, ensuring framework-aligned android and iOS locators, tests, and best practices.
Explore implementing the iOS page factory in Appium 3 AI by extracting xml pages with APM inspector, generating accessibility id locators for login, home, checkout pages and updating page objects.
Update iOS locators across the page factory framework using XML files, applying iOS-specific locators in page objects while keeping Android code intact, with Copilot-assisted updates and accessibility IDs.
Learn ai-driven page factory implementation for mobile automation, detailing iOS username entry character by character, runtime credential passing, and iOS-specific logic for checkout and side menu actions.
Upgrade node.js, APM, and the APM installer before using the images plugin to enable image-based testing, element identification by image, and image-based interactions on Appium 2.x.
package content;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.util.Base64;
import org.openqa.selenium.By;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.imagecomparison.SimilarityMatchingResult;
public class AppiumImage2 {
public static void main(String[] args) throws Exception {
String imagePath="/Users/lucky/Desktop/image9.png";
UiAutomator2Options options = new UiAutomator2Options();
options.setApp("/Users/lucky/Downloads/AutomationTesting/src/test/resources/appfiles/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
options.setPlatformName("Android");
options.setPlatformVersion("13");
options.setCapability("appActivity", "com.swaglabsmobileapp.MainActivity");
options.setDeviceName("Android");
options.setAutomationName("UiAutomator2");
options.setCapability("noReset", false);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URI("http://127.0.0.1:4723").toURL(), options
);
Thread.sleep(4500);
File file = new File(imagePath);
byte[] fileContent=Files.readAllBytes(file.toPath());
byte[] base64Image = Base64.getEncoder().encode(fileContent);
SimilarityMatchingResult result = driver.getImagesSimilarity(base64Image,base64Image);
System.out.println(result.getScore());
Thread.sleep(6500);
driver.quit();
}
}
package content;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.util.Base64;
import org.openqa.selenium.By;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.imagecomparison.SimilarityMatchingResult;
public class AppiumImage3 {
public static void main(String[] args) throws Exception {
String imagePath="/Users/lucky/Desktop/image2.png";
UiAutomator2Options options = new UiAutomator2Options();
options.setApp("/Users/lucky/Downloads/AutomationTesting/src/test/resources/appfiles/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
options.setPlatformName("Android");
options.setPlatformVersion("13");
options.setCapability("appActivity", "com.swaglabsmobileapp.MainActivity");
options.setDeviceName("Android");
options.setAutomationName("UiAutomator2");
options.setCapability("noReset", false);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URI("http://127.0.0.1:4723").toURL(), options
);
Thread.sleep(4500);
File file = new File(imagePath);
byte[] fileContent=Files.readAllBytes(file.toPath());
// String base64Image = Base64.getEncoder().encodeToString(fileContent);
byte[] base64Image = Base64.getEncoder().encode(fileContent);
SimilarityMatchingResult result= driver.getImagesSimilarity(base64Image, base64Image);
System.out.println(result.getScore());
Thread.sleep(6500);
driver.quit();
}
}
Explore using the get images similarity command to compare two equal-sized screenshots and obtain a similarity score. Generate a visual differences image to show where they differ.
Explore the getImagesSimilarity command for image comparison, showing byte-based and file-based inputs, visualized differences, and scoring with similarity matching options and the images plugin.
Appium-device-farm : plugin:
Designed to manage and streamline the creation of driver sessions for android & iOS on real devices & emulators and making it idea for CI/CD pipeline
Usage:
Remotely manage sessions for devices
Monitor & manage test sessions
Enhanced session Management
Automated device recognition
Advanced reporting
Parallel test execution
Installation from Appium-installer
How to start Appium-server:
appium --keep-alive-timeout 800 --use-plugins=device-farm --base-path /wd/hub —plugin-device-farm-platform=android
appium server -ka 800 --use-plugins=device-farm -pa /wd/hub --plugin-device-farm-platform=android
http://appiumserverurl/device-farm
Enable server logs :
appium -ka 800 --use-plugins=device-farm -pa /wd/hub --plugin-device-farm-platform=iOS --log ./df1.log
Reset:
appium plugin run device-farm reset
Program Android::
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class DeviceFarm1 {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setAutomationName("UiAutomator2")
.setAppActivity("com.swaglabsmobileapp.MainActivity")
// .setApp("/Users/lucky/Downloads/app/Android/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
.setApp("file-1753688679030.apk");
AndroidDriver driver = new AndroidDriver(
new URL("http://127.0.0.1:4723/wd/hub"), options
);
Thread.sleep(4500);
Dimension d = driver.manage().window().getSize();
int startX= (int) (d.getWidth() * 0.5);
int startY= (int) (d.getHeight() * 0.5);
int endX = startX;
int endY = (int) (d.getHeight() * 0.2);
PointerInput swipeUp = new PointerInput(PointerInput.Kind.TOUCH,"swipeUp");
Sequence sequence = new Sequence(swipeUp,1);
sequence.addAction(swipeUp.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,startY));
sequence.addAction(swipeUp.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence.addAction(swipeUp.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,endY));
sequence.addAction(swipeUp.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence));
Thread.sleep(5000);
PointerInput swipeDown = new PointerInput(PointerInput.Kind.TOUCH,"swipeDown");
Sequence sequence1 = new Sequence(swipeDown,1);
sequence1.addAction(swipeDown.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,endY));
sequence1.addAction(swipeDown.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence1.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence1.addAction(swipeDown.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,startY));
sequence1.addAction(swipeDown.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence1));
Thread.sleep(16500);
driver.quit();
}
}
Program iOS:
package qobox;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.options.XCUITestOptions;
public class ioSLaunch {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
XCUITestOptions options = new XCUITestOptions().setUdid("2E3F1132-0B7C-41BD-A09A-8311B22EF112").setApp("/Users/lucky/Downloads/app/iOS/Verve.app");
IOSDriver driver = new IOSDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723/wd/hub"), options
);
Thread.sleep(3500);
driver.findElement(AppiumBy.accessibilityId("I already have an account")).click();
driver.findElement(AppiumBy.xpath("//*[@value='Enter email address']")).sendKeys("username");
driver.findElement(AppiumBy.xpath("//*[@value='Enter password']")).sendKeys("password");
driver.findElement(AppiumBy.accessibilityId("Continue")).click();
Thread.sleep(6500);
driver.quit();
}
}
npm install -g appim-doctor
Installation on MAC:
brew install ffmpeg
ffmpeg -version
windows:
https://www.ffmpeg.org/download.html
Select Windows
Select Windows builds from gyan.dev
Download ffmpeg-git-full.7z under latest git master branch build
Unzip it , place it in C drive n rename it
Launch CMD prompt as admin
setx /m PATH “/Users/lucky/Downloads/ffmpeg/bin;%PATH%”
ffmpeg -version
Android Code:
package content;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
public class DeviceFarm2 {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options()
.setPlatformName("Android")
.setPlatformVersion("13")
.setDeviceName("Android")
.setAutomationName("UiAutomator2")
.setAppActivity("com.swaglabsmobileapp.MainActivity")
.setApp("/Users/lucky/Downloads/app/Android/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
// .setApp("file-1753688679030.apk");
options.setCapability("df:recordVideo", true);
// options.setCapability("df:liveVideo", true);
options.setCapability("df:build", "Android build - 13 Eclipse");
AndroidDriver driver = new AndroidDriver(
new URL("http://127.0.0.1:4723/wd/hub"), options
);
Thread.sleep(4500);
Dimension d = driver.manage().window().getSize();
int startX= (int) (d.getWidth() * 0.5);
int startY= (int) (d.getHeight() * 0.5);
int endX = startX;
int endY = (int) (d.getHeight() * 0.2);
PointerInput swipeUp = new PointerInput(PointerInput.Kind.TOUCH,"swipeUp");
Sequence sequence = new Sequence(swipeUp,1);
sequence.addAction(swipeUp.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,startY));
sequence.addAction(swipeUp.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence.addAction(swipeUp.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,endY));
sequence.addAction(swipeUp.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence));
Thread.sleep(5000);
PointerInput swipeDown = new PointerInput(PointerInput.Kind.TOUCH,"swipeDown");
Sequence sequence1 = new Sequence(swipeDown,1);
sequence1.addAction(swipeDown.createPointerMove(Duration.ZERO, PointerInput.Origin.viewport(), 0,endY));
sequence1.addAction(swipeDown.createPointerDown(PointerInput.MouseButton.LEFT.asArg()));
sequence1.addAction(new Pause(swipeUp,Duration.ofMillis(200)));
sequence1.addAction(swipeDown.createPointerMove(Duration.ofMillis(100), PointerInput.Origin.viewport(), 0,startY));
sequence1.addAction(swipeDown.createPointerUp(PointerInput.MouseButton.LEFT.asArg()));
driver.perform(Collections.singletonList(sequence1));
Thread.sleep(16500);
driver.quit();
}
}
iOS Code:
package qobox;
import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import io.appium.java_client.AppiumBy;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.options.XCUITestOptions;
public class ioSLaunchDFVideo {
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
XCUITestOptions options = new XCUITestOptions().setUdid("2E3F1132-0B7C-41BD-A09A-8311B22EF112").setApp("/Users/lucky/Downloads/app/iOS/Verve.app");
// options.setCapability("df:recordVideo", true);
options.setCapability("df:liveVideo", true);
options.setCapability("df:build", "iOS build - 18.1 Eclipse");
IOSDriver driver = new IOSDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URL("http://127.0.0.1:4723/wd/hub"), options
);
Thread.sleep(3500);
driver.findElement(AppiumBy.accessibilityId("I already have an account")).click();
driver.findElement(AppiumBy.xpath("//*[@value='Enter email address']")).sendKeys("username");
driver.findElement(AppiumBy.xpath("//*[@value='Enter password']")).sendKeys("password");
driver.findElement(AppiumBy.accessibilityId("Continue")).click();
Thread.sleep(6500);
driver.quit();
}
}
ElementID: this is mandatory whenever u r using mobile gesture commands
Swipe
Scroll
Longpress
drag
What is elementID: its a random hexadecimal code representing the element in the session which is returned by findByElement API
How can I find elementID??
Appium inspector
Can we use id from inspector in program directly???
17000000-0000-0000-1B10-000000000000
17000000-0000-0000-3016-000000000000
17000000-0000-0000-1817-000000000000
package appiumT;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Duration;
import java.util.Collections;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Pause;
import org.openqa.selenium.interactions.PointerInput;
import org.openqa.selenium.interactions.Sequence;
import org.openqa.selenium.remote.RemoteWebElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.options.XCUITestOptions;
public class AndroidLaunchElementID {
public static void main(String[] args) throws Exception, URISyntaxException {
// TODO Auto-generated method stub
UiAutomator2Options options = new UiAutomator2Options();
options.setApp("/Users/lucky/Downloads/AutomationTesting/src/test/resources/appfiles/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk");
options.setPlatformName("Android");
options.setPlatformVersion("13");
options.setCapability("appActivity", "com.swaglabsmobileapp.MainActivity");
options.setDeviceName("Android");
options.setAutomationName("UiAutomator2");
options.setCapability("noReset", false);
AndroidDriver driver = new AndroidDriver(
// The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
new URI("http://127.0.0.1:4723").toURL(), options
);
Thread.sleep(6700);
WebElement obj = driver.findElement(By.xpath("//android.view.ViewGroup[@content-desc=\"test-LOGIN\"]"));
System.out.println(((RemoteWebElement) obj).getId());
Thread.sleep(6700);
driver.quit();
}
}
Explore the Appium gestures plugin to perform swipe up and swipe down on Android, using element ID, percentage, and direction passed through an execute script with a remote web element.
Learn how to implement swipe up and swipe down gestures on iOS with Appium's gestures plugin, updating iOS element locators via Appium Inspector and running swipe scripts in Java.
Master swipe left and swipe right in Android using the Appium gestures plugin, by locating a container via resource-id, configuring an XPath, and driving left/right with 60% and 40% coordinates.
Learn to perform swipe left and swipe right on iPhone using the Appium gestures plugin, reusing the Android logic with iOS accessibility IDs and a 40% offset.
Show how to perform a double tap using Appium on Android and iOS, locating elements with accessibility IDs and executing the gesture on targets like the star button.
Master long press gestures in Appium for Android and iOS by using a tailored XPath and element id, with pressure and duration to reveal options in the API demos app.
Explore how to perform a double tap using the Appium inspector's gestures tab, including creating a double tap gesture, configuring pointer down, two-millisecond waits, and checking a checkbox.
Learn how to use the Appium inspector recorder tab to record taps and swipes, generate language-specific code, and copy or clear actions for Android and iOS.
Explore common mobile automation interview questions for Appium on Android and iOS, covering real versus virtual devices, capabilities, and handling captures and OTPs.
The interview Q and A Part 3 focuses on Appium inputs, including APM, Android and iOS drivers, and desired capabilities, plus context switching for hybrid apps and practical interview guidance.
Explore real versus virtual device performance, configure provision profiles and WebDriver Agent for iPhone, and leverage a page factory framework to unify Android and iOS locators and tests.
noReset vs fullReset
Type Boolean
Default value false
fullReset —> True —> uninstall the app nn reinstall the app before each n every session
DATA is cleared
Simulates a fresh app to be installed
Slower execution
noReset —> True App is not reinstall
Faster execution
setUdid vs setDeviceName:
Both are used to specify the device for our automation
deviceName —> name of the device & its a mandatory options we need to pass
If only 1 device is connected I can go with generic name like Android or iOS
uDID : optional for Android , which we can get from adb devices
is the unique device identifier for a device which is a mandatory capability we will pass in iOS that identify the simulator or real device
Generate all possible substrings of a given string in Java using nested for loops and the substring method, store results in an ArrayList, and print each substring.
Two Java programs reverse a string: one uses string builder reverse to print the result, the other builds the reversal with a for loop and charAt.
The lecture demonstrates printing numbers in ascending order, using Arrays.sort and a manual bubble-sort style two-loop approach with a temp variable, in Java.
Develop a Java program that capitalizes every word in a string by splitting on spaces, uppercasing the first character with substring and toUpperCase, and reassembling the result using loops.
Learn to count words in a given string by splitting on spaces, compare two Java approaches, and understand how counting logic uses string length and spaces.
Develop a Java program that counts spaces in a given string by iterating characters, incrementing a counter when a space is found, and returning the result for display.
Learn how to overload the Java main method with different signatures, how the runtime selects the actual main method, and how to invoke overloaded mains in a program.
Learn to print numbers from 1 to 10 without a for loop using recursion in Java, with a main method calling a self-referencing method that increments a start value.
This course contains the use of artificial intelligence.
Master Mobile Automation Testing using Appium 3 with real-world Android and iOS automation examples along with modern AI concepts and AI-assisted automation workflows.
This complete hands-on course is designed for testers, automation engineers, SDETs, and developers who want to learn the latest Appium 3 mobile automation framework from basics to advanced concepts using Java.
You will learn how to automate both Android and iOS mobile applications using Appium 3 with multiple practical examples and real-time automation scenarios. The course also covers real iPhone device connection and execution, helping you gain practical industry-level experience in mobile testing.
Along with Appium automation, this course also introduces modern Artificial Intelligence concepts and demonstrates how AI can improve automation workflows and testing productivity.
Topics Covered in This Course
Appium 3 architecture and latest concepts
Android mobile automation
iOS mobile automation
Real iPhone device setup and execution
Mobile gestures and advanced touch actions
Appium Inspector and all inspector options
Desired capabilities and driver setup
Mobile locators and automation strategies
Java programming concepts for automation
Cucumber BDD framework implementation
Page Factory and framework concepts
Jenkins integration and Jenkins master-slave setup
SauceLabs cloud execution
Test execution and reporting
Interview questions and answers for Appium automation
AI Concepts Covered
Introduction to Artificial Intelligence
Generative AI fundamentals
AI implementation in automation testing
AI-assisted automation workflows
Modern AI tools for testers and developers
This course focuses heavily on practical learning with step-by-step explanations and real-world examples to help you build strong mobile automation skills using the latest Appium 3 ecosystem.
If you want to become a modern mobile automation engineer with knowledge of Android automation, iOS automation, Appium 3, AI concepts, Jenkins, SauceLabs, and framework design, this course will provide a strong foundation aligned with current industry standards.