Bird
0
0

Which method is used to add an argument like '--private' to FirefoxOptions in Selenium Python?

easy📝 Conceptual Q2 of 15
Selenium Python - Cross-Browser Testing
Which method is used to add an argument like '--private' to FirefoxOptions in Selenium Python?
Aadd_option('--private')
Badd_argument('--private')
Cset_argument('--private')
Dset_option('--private')
Step-by-Step Solution
Solution:
  1. Step 1: Recall FirefoxOptions method for arguments

    The correct method to add command line arguments is add_argument().
  2. Step 2: Match method with argument

    Using add_argument('--private') correctly adds the private mode flag.
  3. Final Answer:

    add_argument('--private') -> Option B
  4. Quick Check:

    Method to add argument = add_argument() [OK]
Quick Trick: Use add_argument() to pass Firefox command line flags [OK]
Common Mistakes:
  • Using set_argument() which does not exist
  • Confusing add_option() with add_argument()
  • Using set_option() which is invalid here

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Selenium Python Quizzes