Unable to Start tor using Python Selenium Error failed to start

0 votes
from selenium import webdriver

from selenium.webdriver.firefox.firefox_profile import FirefoxProfile

from selenium.webdriver.firefox.firefox_binary import FirefoxBinary

binary = FirefoxBinary(r'C:\Users\DJ\Desktop\Tor Browser\Browser\firefox.exe')

profile = FirefoxProfile(r"C:\Users\DJ\Desktop\Tor Browser\Browser\TorBrowser\Data\Browser\profile.default")

driver = webdriver.Firefox(profile, binary)

driver.get("https://edureka.co")

A window from tor pops up saying "Tor failed to start" I press OK then it says, "Could not connect to tor control port'. Please help in this matter.Thank you

Jun 29, 2018 in Selenium by Martin
• 4,320 points
3,776 views

1 answer to this question.

0 votes

I tried to solve same problem on windows:

from selenium import webdriver

from selenium.webdriver.firefox.firefox_profile import FirefoxProfile

from selenium.webdriver.firefox.firefox_binary import FirefoxBinary

binary = FirefoxBinary(r"C:\Users\<Windows User>\Desktop\Tor Browser\Browser\firefox.exe")

# start driver without a profile

driver = webdriver.Firefox(firefox_binary=binary)

# configured profile settings

driver.profile.set_preference('network.proxy.type', 1)

driver.profile.set_preference('network.proxy.socks', '127.0.0.1')

driver.profile.set_preference('network.proxy.socks_port', 9051)

driver.get("https://edureka.co")
answered Jun 29, 2018 by Samarpit
• 5,910 points

Related Questions In Selenium

0 votes
1 answer

Headless ChromeDriver using Python Selenium error: Fails To Start— “DevTools request failed”

This should be because your ChromeDriver is ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,500 points
2,040 views
0 votes
1 answer
0 votes
2 answers

Unable to Click on an Element in Selenium (Python) even after finding it.

Here, I give you working script which ...READ MORE

answered Sep 19, 2018 in Selenium by Priyaj
• 58,020 points
24,140 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,674 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,143 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,875 views
0 votes
1 answer

Error: unable to add browser extension to Firefox profile using Selenium

Try to create profile on Firefox browser ...READ MORE

answered Jul 11, 2018 in Selenium by Samarpit
• 5,910 points
3,166 views
0 votes
1 answer

How to login a forum using Selenium with Python

You should try to directly log in ...READ MORE

answered Apr 27, 2018 in Selenium by Samarpit
• 5,910 points
2,755 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP