Skip to content

Instantly share code, notes, and snippets.

@SarahElson
SarahElson / testng.xml
Last active September 15, 2022 11:17
Complete Tutorial On Appium Parallel Testing [With Examples]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Lambda tests Mobile automation test suite" parallel="tests" thread-count="4">
<test name="Proverbial app - Android Mobile Automation on Pixel 5">
<parameter name="deviceId" value="1"/>
<classes>
<class name="io.github.mfaisalkhatri.mobileautomation.tests.AndroidTests">
<methods>
<include name="textTests"/>
<include name="notificationTest"/>
@SarahElson
SarahElson / pom.xml
Last active September 15, 2022 11:17
Complete Tutorial On Appium Parallel Testing [With Examples]
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.release.version>11</java.release.version>
<testng-version>7.6.0</testng-version>
<jackson-databind-version>2.13.3</jackson-databind-version>
<appium-java-version>7.6.0</appium-java-version>
<suite-xml>testng.xml</suite-xml>
<maven.source.encoding>UTF-8</maven.source.encoding>
<maven.compiler.version>3.8.1</maven.compiler.version>
@SarahElson
SarahElson / parallel.config.json
Last active September 15, 2022 11:27
Complete Tutorial On Appium Parallel Testing [With Examples]
{
"commonCapabilities": {
"isRealMobile": true,
"visual": true,
"console": true,
"devicelog": true
},
"deviceAndBuildCaps": [
{
"id": "1",
@SarahElson
SarahElson / Configuration.js
Last active September 15, 2022 11:28
Complete Tutorial On Appium Parallel Testing [With Examples]
@Builder
public class DriverManager {
private static final ThreadLocal<AppiumDriver<MobileElement>> DRIVER = new ThreadLocal<> ();
private static final String GRID_URL = "@mobile-hub.lambdatest.com/wd/hub";
private static final Logger LOGGER = LogManager.getLogger (
"DriverManager.class");
private static final String LT_ACCESS_TOKEN = System.getenv ("token");
private static final String LT_USERNAME = System.getenv ("username");
private String deviceId;
@SarahElson
SarahElson / cy.visit() Case Example 2
Last active August 3, 2022 08:40
Cypress End to End Testing: Case Example 1
/// <reference types="cypress" />
it("Open the Url", () => {
cy.visit(
"https://ecommerce-playground.lambdatest.io/index.php?route=account/login"
);
});
it("Login into the application", () => {
cy.get('[id="input-email"]').type("[email protected]");
cy.get('[id="input-password"]').type("lambdatest");
cy.get('[type="submit"]').eq(0).click();
@SarahElson
SarahElson / cy.visit(). Case Example 2
Created August 3, 2022 08:39
Cypress End to End Testing: Case Example 2
/// <reference types="cypress" />
it("Open the Url", () => {
cy.visit(
"https://ecommerce-playground.lambdatest.io/index.php?route=account/login"
);
});
it("Login into the application", () => {
cy.get('[id="input-email"]').type("[email protected]");
cy.get('[id="input-password"]').type("lambdatest");
cy.get('[type="submit"]').eq(0).click();
@SarahElson
SarahElson / lambdatest-config.json
Last active August 3, 2022 09:23
Step-up lambdatest for Cypress test case execution
{
"lambdatest_auth": {
"username": "username",
"access_key": "access_key"
},
"browsers": [
{
"browser": "Chrome",
"platform": "Windows 10",
"versions": ["latest-1"]
@SarahElson
SarahElson / HTML boilerplates
Created August 4, 2022 06:04
A Beginner’s Guide To Styling CSS Forms
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>How to style forms with CSS: A beginner's guide</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
@SarahElson
SarahElson / HTML Tags
Created August 4, 2022 06:06
A Beginner’s Guide To Styling CSS Forms
class="site__container">
<main class="hero__images">
<main class="card__wrapper">
<!-- background for the form -->
<section class="card__forms">
<!-- Wrapper for all items of the box -->
<section class="items__wrapper">
<div class="site__logo">MS</div>
@SarahElson
SarahElson / Dockerfile
Last active August 17, 2022 12:33
Podman vs Docker: All You Need To Know!
FROM node:16
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./