Complete the code to create a Firefox profile object.
from selenium.webdriver import FirefoxProfile profile = [1]()
The FirefoxProfile() creates a new Firefox profile object to customize browser settings.
Complete the code to set a preference in the Firefox profile.
profile = FirefoxProfile() profile.[1]('browser.startup.homepage', 'https://example.com')
The method set_preference is used to set Firefox profile preferences like homepage URL.
Fix the error in the code to load the Firefox profile into options.
from selenium.webdriver import Firefox, FirefoxOptions, FirefoxProfile profile = FirefoxProfile() options = FirefoxOptions() options.[1] = profile.path browser = Firefox(options=options)
The correct way to assign a profile to options is options.profile = profile.path.
Fill both blanks to create a Firefox driver with a custom profile and disable notifications.
profile = FirefoxProfile() profile.[1]('dom.webnotifications.enabled', False) options = FirefoxOptions() options.[2] = profile.path driver = Firefox(options=options)
Use set_preference to disable notifications and options.profile = profile.path to assign the profile to options.
Fill all three blanks to create a Firefox profile, set homepage, assign profile to options, and start the browser.
profile = FirefoxProfile() profile.[1]('browser.startup.homepage', 'https://openai.com') options = FirefoxOptions() options.[2] = profile.path driver = Firefox([3]=options)
Set the homepage with set_preference, assign profile with options.profile = profile.path, and pass options as options argument to Firefox.