Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "tronio.py", line 1456, in <module>
- task1()
- File "tronio.py", line 74, in task1
- driver1 = webdriver.Firefox(capabilities=desired_capability)
- File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverfirefoxwebdriver.py", line 158, in __init__
- keep_alive=True)
- File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 154, in __init__
- self.start_session(desired_capabilities, browser_profile)
- File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 243, in start_session
- response = self.execute(Command.NEW_SESSION, parameters)
- File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 312, in execute
- self.error_handler.check_response(response)
- File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremoteerrorhandler.py", line 237, in check_response
- raise exception_class(message, screen, stacktrace)
- selenium.common.exceptions.InvalidArgumentException: Message: Invalid proxy configuration entry: httpProxyPort
- proxy = ip:port
- hostport = proxy[proxy.find("@")+1:]
- host = hostport[0:hostport.find(":")]
- port = hostport[hostport.find(":")+1:]
- if proxy:
- desired_capability = webdriver.DesiredCapabilities.FIREFOX
- desired_capability['proxy']={
- "httpProxy":host,
- "httpProxyPort": port
- }
- driver1 = webdriver.Firefox(capabilities=desired_capability)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement