UI Automation ProPlus Playground

1. Dynamic Content / Infinite Scroll

Scrollable product feed:

Java/Playwright snippet:
Set seenItems = new HashSet<>();
List<WebElement> items = driver.findElements(By.cssSelector(".product-item"));
for(WebElement item : items) {
    String id = item.getAttribute("data-id");
    if(!seenItems.contains(id)) {
        seenItems.add(id);
        System.out.println("Validating item: " + id);
    }
}
    

2. Drag-and-Drop with Overlapping Layers

Drag the purple box into the drop zone:

Drag
Drop
Java/Playwright snippet:
WebElement source = driver.findElement(By.id("dragBox"));
WebElement target = driver.findElement(By.id("dropZone"));
Actions actions = new Actions(driver);
actions.clickAndHold(source).moveToElement(target).release().perform();
    

3. Multi-Step Conditional Modals

Java/Playwright snippet:
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
WebElement modal = wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".modal-dialog")));
modal.findElement(By.cssSelector(".next-btn")).click();
    

4. OTP Validation Handling

Enter OTP for test user:

Java/Playwright snippet:
// Fetch OTP from API or test service
String otp = OtpService.getLatestOtpForUser("testuser");
driver.findElement(By.id("otpInput")).sendKeys(otp);
driver.findElement(By.id("submitBtn")).click();
    

5. Cross-Browser / Platform-Specific Rendering

Resize the window to see layout differences:

Box 1
Box 2
Box 3
Box 4
Java/Playwright snippet:
WebDriver driverChrome = new ChromeDriver();
WebDriver driverFirefox = new FirefoxDriver();
driverChrome.get("https://example.com");
driverFirefox.get("https://example.com");
// Use visual validation or screenshot comparison