Skip to main content
← TesterRank/Topics

Real-World Challenges

Practice handling tricky real-world automation scenarios — dynamic IDs, stale elements, overlays, and infinite scroll.

DOM Challenges

Current IDs:

    No button clicked yet

    Hint: These button IDs change on every page load. You cannot rely on #id selectors. Use data-testid, CSS class selectors, or XPath with text content instead.

    display: none

    Box 1 is here (hidden)

    visibility: hidden

    opacity: 0

    Find me!

    height: 0 + overflow

    Find me!
    Box 4 is here (clipped)

    Click Check Visibility to inspect elements

    Hint: Selenium's isDisplayed() returns false for display:none, visibility:hidden, and height:0. But opacity:0 elements ARE considered displayed! This is a common interview question.

    List version: 1

    • Apple
    • Banana
    • Cherry
    • Dragonfruit
    • Elderberry

    List has been refreshed 0 time(s)

    Hint:After the list refreshes, any WebElement references you stored earlier become stale. You'll get StaleElementReferenceException. Always re-find elements after DOM changes.

    Interaction Challenges

    Try clicking the button behind the overlay

    Hint: ElementClickInterceptedException -- another element would receive the click. Always check for overlays, cookie banners, or loading spinners before clicking.
    5

    Button enabled in 5s

    Hint: Don't use Thread.sleep(5000). Use WebDriverWait with ExpectedConditions.elementToBeClickable(). This is the difference between implicit and explicit waits.

    Scroll & Load

    Scroll down to find the hidden button.

    Keep scrolling... the button is way down there.

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

    Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra.

    Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat.

    Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.

    Phasellus ultrices nulla quis nibh. Quisque a lectus. Donec consectetuer ligula vulputate sem tristique cursus.

    Fusce commodo aliquam arcu. Nam commodo suscipit quam. Quisque id odio.

    Scroll to find the secret button

    Hint: Elements below the fold aren't interactable until scrolled into view. Use JavaScript scrollIntoView() or Actions.moveToElement().

    Showing 10 of 50 items

    • Item 1
    • Item 2
    • Item 3
    • Item 4
    • Item 5
    • Item 6
    • Item 7
    • Item 8
    • Item 9
    • Item 10

    10 items loaded, scroll for more

    Hint: Scroll the container, wait for loading indicator, wait for new items. Use JavaScriptExecutor to scroll. Verify item count increases.

    Images

    Image 1
    Broken Image 2
    Image 3
    Broken Image 4

    6 links and 4 images to inspect for broken resources

    Hint: Use HTTP requests to check link status codes (200 vs 404). For images, check naturalWidth === 0 or the complete property. Broken resource detection is a common test automation task.