

The SetPreference method configures the Firefox profile to use the Tor’s proxy settings. We start a new process of the browser which we kill in the test cleanup. This.Wait = new WebDriverWait( this.Driver, TimeSpan.FromSeconds( 60)) īy default, Tor is installed on your desktop. This.Driver = new FirefoxDriver(profile) = ProcessWindowStyle.Maximized įirefoxProfile profile = new FirefoxProfile() String torBinaryPath = C:\Users\aangelov\Desktop\Tor Browser\Browser\firefox.exe" Next, we start a new FirefoxDriver configured with a new profile with the proxy settings generated by Tor. So the first step in the plan is to start a new instance of ?r. Once started, the proxy generated by Tor can be accessed via “ 127.0.0.1 9051“. You cannot start the Tor browser using IWebDriver interface because there isn’t an implementation for it.

You have all features of Firefox plus additional protection.ĭownload it from here: Integrate Tor and Selenium WebDriver Today, it is used every day for a wide variety of purposes by normal people, the military, journalists, law enforcement officers, activists, and many others.Īs you can see, Tor is a modified Firefox browser. Navy in mind, for the primary purpose of protecting government communications.

It was originally developed with the U.S. Tor is a free software and an open network that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Finally, I did it! You can find my discoveries below. I wasted almost half a day to discover how to combine them. However, I found out that there isn't a built-in integration between the two. My preferred automation framework is Selenium WebDriver. From a really long time, I wanted to write automation using the Tor Web Browser.
