Skip to content

Instantly share code, notes, and snippets.

@SarahElson
SarahElson / install.sh
Created November 26, 2025 12:49
XAPK , APKM , ZIP converter for MacOs and Linux
#!/bin/bash
# ==============================================================================
# Universal XAPK/APKM Converter (Linux & macOS)
# Runs via: curl -sL <URL> | bash
# ==============================================================================
# --- CONFIGURATION ---
TEMP_DIR="/tmp/xapk_tool"
APKEDITOR_URL="https://github.com/REAndroid/APKEditor/releases/download/V1.4.5/APKEditor-1.4.5.jar"
@SarahElson
SarahElson / keyDown().java
Created April 25, 2025 12:10
What Is New In Selenium 4 And What Is Deprecated In It?
public void test_LambdaTest_keyDown_keyUp_demo() {
driver.navigate().to("https://www.google.com/");
driver.manage().window().maximize();
try {
Actions action = new Actions(driver);
WebElement inputBox = driver.findElement(By.name("q"));
@SarahElson
SarahElson / pause().java
Created April 25, 2025 12:09
What Is New In Selenium 4 And What Is Deprecated In It?
public void test_LambdaTest_pause_demo() {
driver.navigate().to("https://www.google.com/");
driver.manage().window().maximize();
try {
Actions action = new Actions(driver);
WebElement inputBox = driver.findElement(By.name("q"));
action.moveToElement(inputBox)
@SarahElson
SarahElson / dragAndDrop().java
Created April 25, 2025 12:07
What Is New In Selenium 4 And What Is Deprecated In It?
public void test_LambdaTest_drag_drop_demo() throws InterruptedException {
driver.navigate().to("https://www.lambdatest.com/selenium-playground/drag-and-drop-demo");
driver.manage().window().maximize();
try {
Actions action = new Actions(driver);
WebElement source = driver.findElement(By.id("draggable"));
WebElement target = driver.findElement(By.id("droppable"));
action.dragAndDrop(source, target).build().perform();
@SarahElson
SarahElson / package.json
Created March 17, 2025 09:42
How to Use Cypress scrollIntoView() Command
{
"name": "canvas-automation-cypress",
"version": "1.0.0",
"description": "ScrollIntoView Demo with Cypress",
"main": "index.js",
"scripts": {
"cypress:open": "cypress open",
"cypress:chrome": "cypress run --browser=chrome"
},
"keywords": [
@SarahElson
SarahElson / scroll-into-view-demo.cy.js
Created March 17, 2025 07:54
How to Use Cypress scrollIntoView() Command
/* Official Documentation */
/* https://docs.cypress.io/api/commands/scrollintoview */
/* Cypress Custom Command - Scroll till end of page */
/* Python equivalent */
/* https://github.com/hjsblogger/web-scraping-with-python/blob/main/pageobject/helpers.py#L96 */
/* https://github.com/hjsblogger/web-scraping-with-python/blob/main/pageobject/helpers.py#L111 */
@SarahElson
SarahElson / scroll-into-view-demo.cy.js
Created March 17, 2025 07:44
How to Use Cypress scrollIntoView() Command
it('Window ScrollIntoView Demo - Lazy Loaded Images', () =>
{
const cameraImage = '#mz-product-listing-image-39217984-0-2 > div > div.carousel-item.active > img';
cy.visit(urls.url1);
/* Wait till the DOM contents are loaded */
/* in this case, it is only the canvas element */
cy.document().should((doc) => {
expect(doc.readyState).to.equal('complete');
});
/* Scroll to the bottom */
@SarahElson
SarahElson / urls.json
Created March 17, 2025 07:35
How to Use Cypress scrollIntoView() Command
{
"url1": "https://ecommerce-playground.lambdatest.io/",
"url2": "https://scrapingclub.com/exercise/list_infinite_scroll/"
}
{
"name": "canvas-automation-cypress",
"version": "1.0.0",
"description": "ScrollIntoView Demo with Cypress",
"main": "index.js",
"scripts": {
"cypress:open": "cypress open",
"cypress:chrome": "cypress run --browser=chrome"
},
"keywords": [
@SarahElson
SarahElson / canvas_autogui.py
Created January 6, 2025 10:01
How to Use Selenium and Cypress for Canvas Automation
# Inspiration - https://www.youtube.com/watch?v=lfk_T6VKhTE
import pyautogui
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium import webdriver
import time