How to turn off 'Enhanced Tracking Protection' for Firefox browser via Selenium WebDriver?

Viewed 387
1 Answers

I'm using Selenium with PowerShell and I had the same issue. This solution works for me

[OpenQA.Selenium.Firefox.FirefoxProfileManager]$ProfileManager= [OpenQA.Selenium.Firefox.FirefoxProfileManager]::new()
[OpenQA.Selenium.Firefox.FirefoxProfile]$FirefoxProfile = $ProfileManager.GetProfile($ProfileName)

$FirefoxProfile.SetPreference("pref.privacy.disable_button.tracking_protection_exceptions", $true)
Related