Skip to content

Instantly share code, notes, and snippets.

@SarahElson
SarahElson / App.js
Created August 13, 2022 04:58
How To Style And Write CSS In React
export default function App() {
return (
<div
class="relative flex min-h-screen flex-col justify-center overflow-hidden bg-gray-50 py-6 sm:py-12">
<img
src="/img/beams.jpg"
alt=""
className="absolute top-1/2 left-1/2 max-w-none -translate-x-1/2 -translate-y-1/2" width="1308" />
@SarahElson
SarahElson / App.js
Created August 13, 2022 05:05
How To Style And Write CSS In React
import React, { Component } from "react";
//react bootstrap components
import CardDeck from "react-bootstrap/CardDeck";
import Card from "react-bootstrap/Card";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
//scss
import style from "./styles.module.scss";
@SarahElson
SarahElson / App.tsx
Created August 13, 2022 05:13
How To Style And Write CSS In React
import * as React from "react";
import Container from "@mui/material/Container";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Link from "@mui/material/Link";
import Stack from '@mui/material/Stack';
import Rating from '@mui/material/Rating';
import CircularProgress from '@mui/material/CircularProgress';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
@SarahElson
SarahElson / iOS_Test.java
Last active August 17, 2022 12:02
How To Automate iOS App Using Appium
import io.appium.java_client.MobileBy;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import java.net.MalformedURLException;
import java.net.URL;
import io.appium.java_client.remote.MobileCapabilityType;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
@SarahElson
SarahElson / vanilla_ios.java
Last active August 17, 2022 12:02
How To Automate iOS App Using Appium
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;
@SarahElson
SarahElson / final code
Created August 23, 2022 07:29
Playwright End To End Testing Tutorial: A Complete Guide
const capabilities = {
browserName: "Chrome", // Browsers allowed: `Chrome`, `MicrosoftEdge`, `pw-chromium`, `pw-firefox` and `pw-webkit`
browserVersion: "latest",
"LT:Options": {
platform: "Windows 10",
build: "Playwright Build",
name: "Playwright Test",
user: "your-user",
accessKey: "your-key",
},
@SarahElson
SarahElson / File: typescript.spec.ts
Created August 23, 2022 08:49
File: typescript.spec.ts
test('Should add item to cart', async({page})=>{
await page.goto('https://ecommerce-playground.lambdatest.io/');
await page.locator("span.title", {hasText: 'Mega Menu' }).hover()
await page.locator("a[title=Desktop]").click();
await page.locator("div.carousel-item.active > img[title='HTC Touch HD']").click()
await page.locator("#container button[title='Add to Cart']").click();
await page.locator("a.btn.btn-primary.btn-block",{hasText: 'View Cart'}).click()
await expect(page.locator("td.text-left", {hasText: 'HTC Touch HD'})).toBeVisible()
await expect(page.locator("div[class$='flex-nowrap'] > input")).toHaveValue("1")
})
@SarahElson
SarahElson / Implementation (Test Scenario – 1).py
Last active September 28, 2022 16:00
Selenium Python Tutorial: A Python Automation Testing Guide with examples
#Implementation of Selenium WebDriver with Python using PyTest
import pytest
from selenium import webdriver
import sys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from time import sleep
saf_capabilities = {
"build" : "Porting test to LambdaTest Selenium Grid (Safari)",
"name" : "Porting test to LambdaTest Selenium Grid (Safari)",
@SarahElson
SarahElson / test_lambdatest_todo.py
Last active August 31, 2022 16:31
Selenium Python Tutorial: A Python Automation Testing Guide with examples
#Implementation of Selenium WebDriver with Python using PyTest
import pytest
from selenium import webdriver
import sys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from time import sleep
saf_capabilities = {
"build" : "Porting test to LambdaTest Selenium Grid (Safari)",
"name" : "Porting test to LambdaTest Selenium Grid (Safari)",
@SarahElson
SarahElson / testScripts -parallelSignup.py
Created September 6, 2022 16:03
Playwright Python Tutorial
from playwright.sync_api import sync_playwright
import sys
sys.path.append(sys.path[0] + "/..")
from elementSelectors.registrationPageSelectors import elementSelector
from testCapabilities.testCaps import testCapabilities
select = elementSelector()