Bird
0
0

Which Python Selenium code snippet correctly waits for manual CAPTCHA completion before continuing?

easy📝 Syntax Q3 of 15
Selenium Python - Advanced Patterns
Which Python Selenium code snippet correctly waits for manual CAPTCHA completion before continuing?
Atime.sleep('captcha')
Bdriver.wait(10)
Cdriver.find_element_by_id('captcha').click()
Dinput('Solve CAPTCHA and press Enter to continue...')
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct waiting method

    Using input() pauses execution until user confirms CAPTCHA solved.
  2. Step 2: Check other options

    driver.wait(10) is invalid syntax; clicking CAPTCHA won't solve it; sleep needs number, not string.
  3. Final Answer:

    input('Solve CAPTCHA and press Enter to continue...') -> Option D
  4. Quick Check:

    Manual wait = input() prompt [OK]
Quick Trick: Use input() to pause test for manual CAPTCHA solving [OK]
Common Mistakes:
  • Using invalid wait syntax
  • Trying to click CAPTCHA element
  • Passing string to sleep() instead of number

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes