This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"url1": "https://ecommerce-playground.lambdatest.io/", | |
"url2": "https://scrapingclub.com/exercise/list_infinite_scroll/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test is a replica of: https://github.com/hjsblogger/web-scraping-with-python/ | |
# blob/main/tests/beautiful-soup/test_infinite_scraping.py | |
*** Settings *** | |
Resource ../../Resources/PageObject/KeyDefs/Common.robot | |
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot | |
Variables ../../Resources/PageObject/Locators/Locators.py | |
NewerOlder