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

My Selenium Java test script runs on Firefox browser.

Recently, it has started failing on applications where 'Enhanced Tracking Protection' is turned on.

https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop

How can I disable/turn it off via Selenium Web Driver? Is there any preference or capability through which I can turn it off in the Firefox profile?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source