Waits & Synchronization

 

  1. Selenium wait types?
    A. Hard wait
    B. Implicit wait
    C. Explicit wait
    D. Both B & C
    Answer: D

  2. Implicit wait applies to:
    A. Only one element
    B. All elements
    C. Only find_elements
    D. Only find_element
    Answer: B

  3. To use WebDriverWait:

    from selenium.webdriver.support.ui import ______

    A. Wait
    B. WebDriverWait
    C. WaitDriver
    Answer: B

  4. Explicit wait is applied to:
    A. Single condition
    B. Entire session
    C. All locators
    D. Browser
    Answer: A

  5. Condition for element visibility:
    A. visibility_of()
    B. visible()
    C. element_to_be_visible()
    D. visibility_of_element_located()
    Answer: D

  6. Implicit wait command:
    A. driver.imp_wait(10)
    B. driver.implicitly_wait(10)
    C. driver.wait(10)
    D. driver.default_wait(10)
    Answer: B

  7. Explicit wait belongs to which module?
    A. selenium.support.expected_conditions
    B. selenium.webdriver.support.expected_conditions
    C. selenium.ec
    D. selenium.conditions
    Answer: B

  8. Fluent wait is available in Python?
    A. Yes
    B. No
    Answer: B

  9. TimeoutException occurs when:
    A. Element found early
    B. Browser closed
    C. Condition not met within time
    D. Invalid locator
    Answer: C

  10. Sleep is:
    A. Hard wait
    B. Soft wait
    C. Explicit wait
    D. Implicit wait
    Answer: A

  11. Command for sleep:
    A. time.sleep()
    B. sleep()
    C. selenium.sleep()
    D. wait.sleep()
    Answer: A

  12. WebDriverWait uses:
    A. Polling
    B. Hard wait
    C. Page refresh
    D. Reopen browser
    Answer: A

  13. Default polling time of WebDriverWait?
    A. 50 ms
    B. 100 ms
    C. 500 ms
    D. 0 ms
    Answer: C

  14. Exception ignored in wait?
    A. NoSuchElementException
    B. TimeoutException
    C. ElementClickInterceptedException
    D. WebDriverException
    Answer: A

  15. To wait until element is clickable:
    A. clickable()
    B. element_to_be_clickable()
    C. wait_click()
    D. click_ready()
    Answer: B

  16. To wait for URL:
    A. url_is
    B. url_contains
    C. Both A & B
    D. url_match
    Answer: C

  17. Explicit wait parameter is:
    A. time only
    B. condition only
    C. both time and condition
    Answer: C

  18. Selenium waits work only on:
    A. Browser events
    B. JavaScript events
    C. Web elements
    D. Windows apps
    Answer: C

  19. WebDriverWait returns:
    A. Boolean
    B. Element
    C. Time
    D. URL
    Answer: B

  20. Wait for element presence:
    A. presence_of_element_located
    B. find_element
    C. availability()
    D. locate()
    Answer: A

No comments:

Post a Comment