0
0
Selenium Pythontesting~5 mins

Firefox configuration in Selenium Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of Firefox profile in Selenium testing?
A Firefox profile stores user preferences, extensions, and settings. In Selenium, it helps customize browser behavior during tests, like disabling pop-ups or setting download folders.
Click to reveal answer
intermediate
How do you set a custom download folder in Firefox using Selenium Python?
You create a Firefox profile, set the preference 'browser.download.dir' to the folder path, and set 'browser.download.folderList' to 2 to use the custom folder.
Click to reveal answer
beginner
What is the role of FirefoxOptions in Selenium?
FirefoxOptions lets you configure Firefox browser settings like headless mode, binary location, and attaching a profile before starting the browser in Selenium tests.
Click to reveal answer
beginner
How can you run Firefox in headless mode using Selenium Python?
Use FirefoxOptions and call options.headless = True before passing it to the WebDriver. This runs Firefox without opening a visible window.
Click to reveal answer
intermediate
Why is it important to disable Firefox's default download dialog in automated tests?
Disabling the download dialog prevents tests from hanging or failing because the dialog waits for user interaction. Setting preferences to auto-download files ensures smooth automation.
Click to reveal answer
Which Firefox preference disables the download dialog to auto-save files in Selenium?
Abrowser.helperApps.neverAsk.saveToDisk
Bbrowser.download.folderList
Cbrowser.download.manager.showWhenStarting
Dbrowser.download.dir
How do you apply a Firefox profile to the WebDriver in Selenium Python?
AProfiles are not used in Selenium
BSet profile path in WebDriver constructor directly
CPass the profile to FirefoxOptions and then to WebDriver
DUse driver.set_profile() method
What does setting 'browser.download.folderList' to 2 do?
AUses the default downloads folder
BUses the desktop as download folder
CDisables downloads
DUses a custom download folder specified by 'browser.download.dir'
Which method enables headless mode in FirefoxOptions?
Aoptions.set_headless()
Boptions.headless = True
Coptions.enable_headless()
Doptions.headless_mode()
Why might you want to set 'browser.download.manager.showWhenStarting' to False?
ATo hide the download manager and avoid interruptions
BTo show the download manager on start
CTo disable downloads
DTo clear download history
Explain how to configure Firefox to automatically download files to a specific folder in Selenium Python.
Think about preferences that control download folder and dialogs.
You got /5 concepts.
    Describe how to run Firefox in headless mode using Selenium Python and why it is useful.
    Focus on options and benefits of headless mode.
    You got /5 concepts.