Bird
0
0

What will happen if you run this code?

medium📝 Predict Output Q5 of 15
Selenium Python - Cross-Browser Testing
What will happen if you run this code?
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--start-maximized')
driver = webdriver.Chrome(options=options)
driver.get('https://example.com')
AChrome window opens maximized
BChrome window opens minimized
CChrome opens in headless mode
DCode throws runtime error
Step-by-Step Solution
Solution:
  1. Step 1: Understand the argument --start-maximized

    This argument instructs Chrome to open the browser window maximized on the screen.
  2. Step 2: Confirm no errors and expected behavior

    The code is correct and will open Chrome maximized, not minimized or headless.
  3. Final Answer:

    Chrome window opens maximized -> Option A
  4. Quick Check:

    --start-maximized opens window maximized [OK]
Quick Trick: Use --start-maximized to open Chrome full screen [OK]
Common Mistakes:
  • Confusing maximized with minimized
  • Expecting headless mode without --headless argument
  • Assuming runtime error with correct code

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes