diff --git a/.gitignore b/.gitignore
index f70e4d3..bd21d46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,9 @@
.project
.settings
.theia
+.DS_Store
+node_modules/
+package-lock.json
+log/
+cypress/screenshots/
+cypress/videos/
\ No newline at end of file
diff --git a/.gitpod.yml b/.gitpod.yml
index 2f1526e..7a33b68 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -5,5 +5,7 @@ ports:
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
tasks:
- - init: mvn install -Dsuite=parallel.xml # runs during prebuild
- command: echo 'Please check your test on https://automation.lambdatest.com/'
+ - init: mvn install # runs during prebuild
+ command:
+ npm install # installs package.json
+
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..3c6cdb5
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..d5cd614
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..fe3f751
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,6 @@
+{
+ "standard.enable": false,
+ "eslint.enable": true,
+ "typescript.surveys.enabled": false,
+ "editor.formatOnSave": false
+}
diff --git a/README.md b/README.md
index 3817122..6325dee 100644
--- a/README.md
+++ b/README.md
@@ -1,59 +1,26 @@
-# Java TestNG Selenium & Appium
-
-### Environment Setup
-
-1. Global Dependencies
- * Install [Maven](https://maven.apache.org/install.html)
- * Or Install Maven with [Homebrew](http://brew.sh/) (Easier)
- ```
- $ mvn install
- ```
-2. Project Dependencies
- * checkout the repository
- * Check that packages are available
- ```
- $ cd Java_TestNG_Web-App
- ```
- * You may also want to run the command below to check for outdated dependencies. Please be sure to verify and review updates before editing your pom.xml file as they may not be compatible with your code.
- ```
- $ mvn versions:display-dependency-updates
- ```
-
-**LambdaTest Authentication Credentials:** Make sure you have your LambdaTest credentials with you to run test automation scripts with Jest on LambdaTest Selenium Grid. You can obtain these credentials from the [LambdaTest Automation Dashboard](https://automation.lambdatest.com/) or through [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile).
-
-Set LambdaTest Username and Access Key in environment variables.
-
-* For Linux/macOS:
-`export LT_USERNAME="YOUR_USERNAME"
-export LT_ACCESS_KEY="YOUR ACCESS KEY"`
-
-* For Windows:
-`set LT_USERNAME="YOUR_USERNAME"
-set LT_ACCESS_KEY="YOUR ACCESS KEY"`
-
-### Running Tests
```
-To run single test (Web Browser Automation)
- $ mvn test -D suite=single.xml
+To run single test (Web Browser Automation) use below command
+ mvn test -D suite=single.xml
-To run parallel test (Web Browser Automation)
- $ mvn test -D suite=parallel.xml
+To run parallel test (Web Browser Automation) use below command
+ mvn test -D suite=parallel.xml
-To run single test (Android App Automation)
- $ mvn test -D suite=android_single.xml
+To run single test (Android App Automation) use below command
+ mvn test -D suite=android_single.xml
-To run single test (Android App Automation)
- $ mvn test -D suite=android_parallel.xml
+To run single test (Android App Automation) use below command
+ mvn test -D suite=android_parallel.xml
-To run single test (iOS App Automation)
- $ mvn test -D suite=iOS_single.xml
+To run single test (iOS App Automation) use below command
+ mvn test -D suite=iOS_single.xml
-To run single test (iOS App Automation)
- $ mvn test -D suite=iOS_parallel.xml
+To run single test (iOS App Automation) use below command
+ mvn test -D suite=iOS_parallel.xml
+
+To run Cypress Test use below command
+ npm test
```
-## About LambdaTest
-[LambdaTest](https://www.lambdatest.com/) is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your [selenium automation testing](https://www.lambdatest.com/selenium-automation) to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.
diff --git a/cypress.json b/cypress.json
new file mode 100644
index 0000000..43130e0
--- /dev/null
+++ b/cypress.json
@@ -0,0 +1,3 @@
+{
+ "projectId": "4b7344"
+}
diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json
new file mode 100644
index 0000000..02e4254
--- /dev/null
+++ b/cypress/fixtures/example.json
@@ -0,0 +1,5 @@
+{
+ "name": "Using fixtures to represent data",
+ "email": "hello@cypress.io",
+ "body": "Fixtures are a great way to mock data for responses to routes"
+}
diff --git a/cypress/integration/examples/login.spec.js b/cypress/integration/examples/login.spec.js
new file mode 100644
index 0000000..ea24f58
--- /dev/null
+++ b/cypress/integration/examples/login.spec.js
@@ -0,0 +1,28 @@
+describe('E2E Tests - Login', () => {
+ it('I navigate to the login page', () => {
+ cy.visit('https://the-internet.herokuapp.com/login')
+ cy.get('h2').should('contain', 'Login Page')
+ })
+
+ it('I submit invalid login credentials', () => {
+ cy.get('#username').type('invalid_usr')
+ cy.get('#password').type('invalid_pass')
+ cy.get('button[type="submit"]').click()
+ cy.get('.flash.error').should('be.visible')
+ cy.screenshot({capture: 'fullPage'})
+ })
+
+ it('I submit valid login credentials', () => {
+ cy.get('#username').type('tomsmith')
+ cy.get('#password').type('SuperSecretPassword!')
+ cy.get('button[type="submit"]').click()
+ cy.get('.flash.success').should('be.visible')
+ cy.screenshot({capture: 'fullPage'})
+ })
+
+ it('I logout from the app', () => {
+ cy.get('.button.secondary.radius').click()
+ cy.get('h2').should('contain', 'Login Page')
+ cy.screenshot({capture: 'fullPage'})
+ })
+})
diff --git a/cypress/integration/examples/login_two.spec.js b/cypress/integration/examples/login_two.spec.js
new file mode 100644
index 0000000..21c1bdb
--- /dev/null
+++ b/cypress/integration/examples/login_two.spec.js
@@ -0,0 +1,28 @@
+describe('E2E Tests - Login_two', () => {
+ it('I navigate to the login page', () => {
+ cy.visit('https://the-internet.herokuapp.com/login')
+ cy.get('h2').should('contain', 'Login Page')
+ })
+
+ it('I submit invalid login credentials', () => {
+ cy.get('#username').type('invalid_usr')
+ cy.get('#password').type('invalid_pass')
+ cy.get('button[type="submit"]').click()
+ cy.get('.flash.error').should('be.visible')
+ cy.screenshot({capture: 'fullPage'})
+ })
+
+ it('I submit valid login credentials', () => {
+ cy.get('#username').type('tomsmith')
+ cy.get('#password').type('SuperSecretPassword!')
+ cy.get('button[type="submit"]').click()
+ cy.get('.flash.success').should('be.visible')
+ cy.screenshot({capture: 'fullPage'})
+ })
+
+ it('I logout from the app', () => {
+ cy.get('.button.secondary.radius').click()
+ cy.get('h2').should('contain', 'Login Page')
+ cy.screenshot({capture: 'fullPage'})
+ })
+})
diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js
new file mode 100644
index 0000000..59b2bab
--- /dev/null
+++ b/cypress/plugins/index.js
@@ -0,0 +1,22 @@
+///
+// ***********************************************************
+// This example plugins/index.js can be used to load plugins
+//
+// You can change the location of this file or turn off loading
+// the plugins file with the 'pluginsFile' configuration option.
+//
+// You can read more here:
+// https://on.cypress.io/plugins-guide
+// ***********************************************************
+
+// This function is called when a project is opened or re-opened (e.g. due to
+// the project's config changing)
+
+/**
+ * @type {Cypress.PluginConfig}
+ */
+// eslint-disable-next-line no-unused-vars
+module.exports = (on, config) => {
+ // `on` is used to hook into various events Cypress emits
+ // `config` is the resolved Cypress config
+}
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
new file mode 100644
index 0000000..119ab03
--- /dev/null
+++ b/cypress/support/commands.js
@@ -0,0 +1,25 @@
+// ***********************************************
+// This example commands.js shows you how to
+// create various custom commands and overwrite
+// existing commands.
+//
+// For more comprehensive examples of custom
+// commands please read more here:
+// https://on.cypress.io/custom-commands
+// ***********************************************
+//
+//
+// -- This is a parent command --
+// Cypress.Commands.add('login', (email, password) => { ... })
+//
+//
+// -- This is a child command --
+// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
+//
+//
+// -- This is a dual command --
+// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
+//
+//
+// -- This will overwrite an existing command --
+// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
diff --git a/cypress/support/index.js b/cypress/support/index.js
new file mode 100644
index 0000000..d68db96
--- /dev/null
+++ b/cypress/support/index.js
@@ -0,0 +1,20 @@
+// ***********************************************************
+// This example support/index.js is processed and
+// loaded automatically before your test files.
+//
+// This is a great place to put global configuration and
+// behavior that modifies Cypress.
+//
+// You can change the location of this file or turn off
+// automatically serving support files with the
+// 'supportFile' configuration option.
+//
+// You can read more here:
+// https://on.cypress.io/configuration
+// ***********************************************************
+
+// Import commands.js using ES2015 syntax:
+import './commands'
+
+// Alternatively you can use CommonJS syntax:
+// require('./commands')
diff --git a/lambdatest-config.json b/lambdatest-config.json
new file mode 100644
index 0000000..4b4011a
--- /dev/null
+++ b/lambdatest-config.json
@@ -0,0 +1,41 @@
+{
+ "lambdatest_auth": {
+ "username": "",
+ "access_key": ""
+ },
+ "browsers": [
+ {
+ "browser": "Chrome",
+ "platform": "Windows 10",
+ "versions": [
+ "latest-1"
+ ]
+ },
+ {
+ "browser": "Firefox",
+ "platform": "macOS Big Sur",
+ "versions": [
+ "latest"
+ ]
+ }
+ ],
+ "run_settings": {
+ "cypress_config_file": "cypress.json",
+ "build_name": "Cypress-Demo",
+ "parallels": 4,
+
+ "specs": "./cypress/integration/examples/*.spec.js",
+ "ignore_files": "",
+ "feature_file_suppport": false,
+ "network": true,
+ "headless": false,
+ "reporter_config_file": "",
+ "npm_dependencies": {
+ "cypress": "9.0.0"
+ }
+ },
+ "tunnel_settings": {
+ "tunnel": false,
+ "tunnel_name": null
+ }
+}
\ No newline at end of file
diff --git a/lambdatest_run.json b/lambdatest_run.json
new file mode 100644
index 0000000..4b3cbef
--- /dev/null
+++ b/lambdatest_run.json
@@ -0,0 +1,4 @@
+{
+ "build_id": "4760421",
+ "session_id": "06f0beb1-7753-4285-ab3b-7a3196fd054e"
+}
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..a1c4433
--- /dev/null
+++ b/package.json
@@ -0,0 +1,21 @@
+{
+ "name": "Cypress_Lambdatest_Demo",
+ "version": "0.0.0-development",
+ "description": "This is an example app used to showcase Cypress.io testing. For a full reference of our documentation, go to https://docs.cypress.io",
+ "main": "index.js",
+ "files": [
+ "app",
+ "cypress"
+ ],
+ "scripts": {
+ "test": "npx lambdatest-cypress run"
+ },
+ "author": "Mayank Maurya",
+ "dependencies": {
+ },
+ "devDependencies": {
+ "cypress": "6.2.1",
+ "lambdatest-cypress-cli": "2.3.0",
+ "typescript": "3.7.4"
+ }
+}
diff --git a/parallel.xml b/parallel.xml
index 21cddc0..06c588a 100644
--- a/parallel.xml
+++ b/parallel.xml
@@ -6,6 +6,7 @@
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 8723a25..75b8f8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,11 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
Java-TestNG-Selenium
Java-TestNG-Selenium
0.0.1-SNAPSHOT
- Java-TestNG-Selenium/src
Java-TestNG-Selenium/src
@@ -18,10 +17,7 @@
maven-compiler-plugin
- 3.7.0
-
- 10
-
+ 3.10.0
org.apache.maven.plugins
@@ -41,7 +37,15 @@
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 7
+ 7
+
+
+
@@ -60,17 +64,17 @@
io.appium
java-client
7.0.0
-
+
commons-io
commons-io
1.3.2
-
+
com.googlecode.json-simple
json-simple
1.1.1
-
+
\ No newline at end of file
diff --git a/runThis.txt b/runThis.txt
new file mode 100644
index 0000000..e69de29
diff --git a/src/test/java/com/lambdaTestApp/android/Android1.java b/src/test/java/com/lambdaTestApp/android/Android1.java
index 9b36509..a720b9b 100644
--- a/src/test/java/com/lambdaTestApp/android/Android1.java
+++ b/src/test/java/com/lambdaTestApp/android/Android1.java
@@ -1,5 +1,6 @@
package com.lambdaTestApp.android;
+import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.net.MalformedURLException;
@@ -8,30 +9,31 @@
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.tools.ant.taskdefs.condition.IsFalse;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
+import java.util.Objects;
public class Android1 {
-
+ public static boolean uploaded;
String userName = System.getenv("LT_USERNAME") == null ? "Your LT Username" : System.getenv("LT_USERNAME");
String accessKey = System.getenv("LT_ACCESS_KEY") == null ? "Your LT AccessKey" : System.getenv("LT_ACCESS_KEY");
- String android_appurl = System.getenv("android_appurl") == null ? "Your android appurl" : System.getenv("android_appurl");
@Test
- public void basicTest() throws MalformedURLException,
- InterruptedException {
- DesiredCapabilities caps = new DesiredCapabilities();
+ public void basicTest() throws IOException, InterruptedException {
+ AppUploadAndroid.upload();
- caps.setCapability("platformName", "Android");
- caps.setCapability("deviceName", "Galaxy Tab S4");
- caps.setCapability("platformVersion", "10");
+ DesiredCapabilities caps = new DesiredCapabilities();
+ caps.setCapability("deviceName", "Galaxy S21");
caps.setCapability("isRealMobile", true);
- caps.setCapability("project", "App Automation Demo");
+ caps.setCapability("platformVersion","11");
+ caps.setCapability("platformName", "Android");
caps.setCapability("build", "Android");
caps.setCapability("name", "Single Test");
- caps.setCapability("app", android_appurl );
+ caps.setCapability("app", "android_appurl");
AndroidDriver driver = new AndroidDriver(
new URL("https://" + userName + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"),
diff --git a/src/test/java/com/lambdaTestApp/android/Android2.java b/src/test/java/com/lambdaTestApp/android/Android2.java
index f0f2a6d..163f4c8 100644
--- a/src/test/java/com/lambdaTestApp/android/Android2.java
+++ b/src/test/java/com/lambdaTestApp/android/Android2.java
@@ -1,5 +1,6 @@
package com.lambdaTestApp.android;
+import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.net.MalformedURLException;
@@ -13,25 +14,23 @@
import org.testng.annotations.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
-public class Android2 {
+public class Android2 extends AppUploadAndroid {
String userName = System.getenv("LT_USERNAME") == null ? "Your LT Username" : System.getenv("LT_USERNAME");
String accessKey = System.getenv("LT_ACCESS_KEY") == null ? "Your LT AccessKey" : System.getenv("LT_ACCESS_KEY");
- String android_appurl = System.getenv("android_appurl") == null ? "Your android appurl" : System.getenv("android_appurl");
@Test
- public void basicTest() throws MalformedURLException,
- InterruptedException {
+ public void basicTest() throws IOException,
+ InterruptedException {
+ AppUploadAndroid.upload();
DesiredCapabilities caps = new DesiredCapabilities();
-
caps.setCapability("platformName", "Android");
caps.setCapability("deviceName", "Google Pixel 4");
caps.setCapability("platformVersion", "11");
caps.setCapability("isRealMobile", true);
- caps.setCapability("project", "App Automation Demo");
caps.setCapability("build", "Android");
caps.setCapability("name", "Single Test");
- caps.setCapability("app", android_appurl);
+ caps.setCapability("app", "android_appurl");
AndroidDriver driver = new AndroidDriver(
new URL("https://" + userName + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"),
diff --git a/src/test/java/com/lambdaTestApp/android/AppUploadAndroid.java b/src/test/java/com/lambdaTestApp/android/AppUploadAndroid.java
new file mode 100644
index 0000000..c2cea1c
--- /dev/null
+++ b/src/test/java/com/lambdaTestApp/android/AppUploadAndroid.java
@@ -0,0 +1,36 @@
+package com.lambdaTestApp.android;
+
+import com.google.gson.JsonObject;
+import com.google.gson.JsonSerializer;
+import okhttp3.*;
+import org.json.simple.JSONObject;
+import org.openqa.selenium.json.Json;
+
+import java.io.File;
+import java.io.IOException;
+
+public class AppUploadAndroid {
+ public static String userName = System.getenv("LT_USERNAME");
+ public static String accessKey = System.getenv("LT_ACCESS_KEY");
+ public static void upload () throws IOException {
+ String credential = Credentials.basic(userName, accessKey);
+
+ OkHttpClient client = new OkHttpClient().newBuilder()
+ .build();
+ MediaType mediaType = MediaType.parse("text/plain");
+ RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
+ .addFormDataPart("appFile","apps/WikipediaSample.apk",
+ RequestBody.create(MediaType.parse("application/octet-stream"),
+ new File("apps/WikipediaSample.apk")))
+ .addFormDataPart("custom_id","android_appurl")
+ .build();
+ Request request = new Request.Builder()
+ .url("https://manual-api.lambdatest.com/app/upload/realDevice")
+ .method("POST", body)
+ .addHeader("Authorization", credential)
+ .build();
+ Response response = client.newCall(request).execute();
+ System.out.println(response.body().string());
+
+ }
+}
diff --git a/src/test/java/com/lambdaTestApp/iOS/AppUpload.java b/src/test/java/com/lambdaTestApp/iOS/AppUpload.java
new file mode 100644
index 0000000..345aa70
--- /dev/null
+++ b/src/test/java/com/lambdaTestApp/iOS/AppUpload.java
@@ -0,0 +1,30 @@
+package com.lambdaTestApp.iOS;
+
+import okhttp3.*;
+
+import java.io.File;
+import java.io.IOException;
+
+public class AppUpload {
+ public static String userName = System.getenv("LT_USERNAME");
+ public static String accessKey = System.getenv("LT_ACCESS_KEY");
+ public static void upload1() throws IOException {
+ String credential = Credentials.basic(userName, accessKey);
+
+ OkHttpClient client = new OkHttpClient().newBuilder()
+ .build();
+ MediaType mediaType = MediaType.parse("text/plain");
+ RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
+ .addFormDataPart("appFile", "apps/lambdatest.ipa",
+ RequestBody.create(MediaType.parse("application/octet-stream"),
+ new File("apps/lambdatest.ipa")))
+ .addFormDataPart("custom_id","iOS_appurl")
+ .build();
+ Request request = new Request.Builder()
+ .url("https://manual-api.lambdatest.com/app/upload/realDevice")
+ .method("POST", body)
+ .addHeader("Authorization", credential)
+ .build();
+ Response response = client.newCall(request).execute();
+ }
+}
diff --git a/src/test/java/com/lambdaTestApp/iOS/iOS1.java b/src/test/java/com/lambdaTestApp/iOS/iOS1.java
index d081f60..8078fb0 100644
--- a/src/test/java/com/lambdaTestApp/iOS/iOS1.java
+++ b/src/test/java/com/lambdaTestApp/iOS/iOS1.java
@@ -1,5 +1,6 @@
package com.lambdaTestApp.iOS;
+import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
@@ -12,13 +13,13 @@
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
-public class iOS1 {
+public class iOS1 extends AppUpload {
public static String username = System.getenv("LT_USERNAME");
public static String accessKey = System.getenv("LT_ACCESS_KEY");
- public static String iOS_appurl = System.getenv("iOS_appurl");
@Test
- public void basicTest() throws MalformedURLException, InterruptedException {
+ public void basicTest() throws IOException, InterruptedException {
+ AppUpload.upload1();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("build", "iOSAppAutomation_LT");
capabilities.setCapability("name", "iOS_Test");
@@ -28,7 +29,7 @@ public void basicTest() throws MalformedURLException, InterruptedException {
capabilities.setCapability("platformVersion", "15.0");
capabilities.setCapability("console", true);
capabilities.setCapability("visual", true);
- capabilities.setCapability("app", iOS_appurl);
+ capabilities.setCapability("app", "iOS_appurl");
IOSDriver driver = new IOSDriver(
new URL("https://" + username + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"),
diff --git a/src/test/java/com/lambdaTestApp/iOS/iOS2.java b/src/test/java/com/lambdaTestApp/iOS/iOS2.java
index 3975c83..8e321ae 100644
--- a/src/test/java/com/lambdaTestApp/iOS/iOS2.java
+++ b/src/test/java/com/lambdaTestApp/iOS/iOS2.java
@@ -1,5 +1,6 @@
package com.lambdaTestApp.iOS;
+import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
@@ -12,23 +13,23 @@
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
-public class iOS2 {
+public class iOS2 extends AppUpload {
public static String username = System.getenv("LT_USERNAME");
public static String accessKey = System.getenv("LT_ACCESS_KEY");
- public static String iOS_appurl = System.getenv("iOS_appurl");
@Test
- public void basicTest() throws MalformedURLException, InterruptedException {
+ public void basicTest() throws IOException, InterruptedException {
+ AppUpload.upload1();
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("build", "iOSAppAutomation_LT");
capabilities.setCapability("name", "iOS_Test");
capabilities.setCapability("platformName", "iOS");
- capabilities.setCapability("deviceName", "iPhone 11");
+ capabilities.setCapability("deviceName", "iPhone 8");
capabilities.setCapability("isRealMobile", true);
capabilities.setCapability("platformVersion", "13.0");
capabilities.setCapability("console", true);
capabilities.setCapability("visual", true);
- capabilities.setCapability("app", iOS_appurl);
+ capabilities.setCapability("app", "iOS_appurl");
IOSDriver driver = new IOSDriver(
new URL("https://" + username + ":" + accessKey + "@beta-hub.lambdatest.com/wd/hub"),
diff --git a/src/test/java/com/lambdatest/TestNGTodo1.java b/src/test/java/com/lambdatest/TestNGTodo1.java
index 62577d1..508422e 100644
--- a/src/test/java/com/lambdatest/TestNGTodo1.java
+++ b/src/test/java/com/lambdatest/TestNGTodo1.java
@@ -32,6 +32,15 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
caps.setCapability("build", "TestNG With Java");
caps.setCapability("name", m.getName() + " - " + this.getClass().getName());
caps.setCapability("plugin", "git-testng");
+ caps.setCapability("performance",true);
+ caps.setCapability("network", true);
+ caps.setCapability("console", true);
+ caps.setCapability("networkThrottling", "Regular 4G");
+ caps.setCapability("commandLog", true);
+ caps.setCapability("systemLog", true);
+ caps.setCapability("terminal", true);
+ caps.setCapability("video", true);
+
String[] Tags = new String[] { "Feature", "Falcon", "Severe" };
caps.setCapability("tags", Tags);
diff --git a/src/test/java/com/lambdatest/TestNGTodo2.java b/src/test/java/com/lambdatest/TestNGTodo2.java
index 1fd4be6..dda3707 100644
--- a/src/test/java/com/lambdatest/TestNGTodo2.java
+++ b/src/test/java/com/lambdatest/TestNGTodo2.java
@@ -32,6 +32,15 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
caps.setCapability("build", "TestNG With Java");
caps.setCapability("name", m.getName() + this.getClass().getName());
caps.setCapability("plugin", "git-testng");
+ caps.setCapability("performance",true);
+ caps.setCapability("network", true);
+ caps.setCapability("console", true);
+ caps.setCapability("networkThrottling", "Regular 4G");
+
+ caps.setCapability("commandLog", true);
+ caps.setCapability("systemLog", true);
+ caps.setCapability("terminal", true);
+ caps.setCapability("video", true);
String[] Tags = new String[] { "Feature", "Magicleap", "Severe" };
caps.setCapability("tags", Tags);
@@ -84,6 +93,90 @@ public void basicTest() throws InterruptedException {
driver.findElement(By.id("addbutton")).click();
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li9")).click();
+ driver.get("https://lambdatest.github.io/sample-todo-app/");
+
+ System.out.println("Checking Box");
+ driver.findElement(By.name("li1")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li2")).click();
+
+ System.out.println("Checking Box");
+ driver.findElement(By.name("li3")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li4")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 6");
+ driver.findElement(By.id("addbutton")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 7");
+ driver.findElement(By.id("addbutton")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 8");
+ driver.findElement(By.id("addbutton")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li1")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li3")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li7")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li8")).click();
+
+ System.out.println("Entering Text");
+ driver.findElement(By.id("sampletodotext")).sendKeys("Get Taste of Lambda and Stick to It");
+
+ driver.findElement(By.id("addbutton")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li9")).click();
+ driver.get("https://lambdatest.github.io/sample-todo-app/");
+
+ System.out.println("Checking Box");
+ driver.findElement(By.name("li1")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li2")).click();
+
+ System.out.println("Checking Box");
+ driver.findElement(By.name("li3")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li4")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 6");
+ driver.findElement(By.id("addbutton")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 7");
+ driver.findElement(By.id("addbutton")).click();
+
+ driver.findElement(By.id("sampletodotext")).sendKeys(" List Item 8");
+ driver.findElement(By.id("addbutton")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li1")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li3")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li7")).click();
+
+ System.out.println("Checking Another Box");
+ driver.findElement(By.name("li8")).click();
+
+ System.out.println("Entering Text");
+ driver.findElement(By.id("sampletodotext")).sendKeys("Get Taste of Lambda and Stick to It");
+
+ driver.findElement(By.id("addbutton")).click();
+
System.out.println("Checking Another Box");
driver.findElement(By.name("li9")).click();
@@ -104,4 +197,4 @@ public void tearDown() {
driver.quit();
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/com/lambdatest/TestNGTodo3.java b/src/test/java/com/lambdatest/TestNGTodo3.java
index 632320c..8d12abf 100644
--- a/src/test/java/com/lambdatest/TestNGTodo3.java
+++ b/src/test/java/com/lambdatest/TestNGTodo3.java
@@ -32,6 +32,15 @@ public void setup(Method m, ITestContext ctx) throws MalformedURLException {
caps.setCapability("build", "TestNG With Java");
caps.setCapability("name", m.getName() + this.getClass().getName());
caps.setCapability("plugin", "git-testng");
+ caps.setCapability("performance",true);
+ caps.setCapability("network", true);
+ caps.setCapability("console", true);
+ caps.setCapability("networkThrottling", "Regular 4G");
+ caps.setCapability("commandLog", true);
+ caps.setCapability("systemLog", true);
+ caps.setCapability("terminal", true);
+ caps.setCapability("video", true);
+
String[] Tags = new String[] { "Feature", "Tag", "Moderate" };
caps.setCapability("tags", Tags);