Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. Traceback (most recent call last):
  2. File "tronio.py", line 1456, in <module>
  3. task1()
  4. File "tronio.py", line 74, in task1
  5. driver1 = webdriver.Firefox(capabilities=desired_capability)
  6. File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverfirefoxwebdriver.py", line 158, in __init__
  7. keep_alive=True)
  8. File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 154, in __init__
  9. self.start_session(desired_capabilities, browser_profile)
  10. File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 243, in start_session
  11. response = self.execute(Command.NEW_SESSION, parameters)
  12. File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremotewebdriver.py", line 312, in execute
  13. self.error_handler.check_response(response)
  14. File "C:Usersninja_000AppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverremoteerrorhandler.py", line 237, in check_response
  15. raise exception_class(message, screen, stacktrace)
  16. selenium.common.exceptions.InvalidArgumentException: Message: Invalid proxy configuration entry: httpProxyPort
  17.  
  18. proxy = ip:port
  19. hostport = proxy[proxy.find("@")+1:]
  20. host = hostport[0:hostport.find(":")]
  21. port = hostport[hostport.find(":")+1:]
  22.  
  23. if proxy:
  24. desired_capability = webdriver.DesiredCapabilities.FIREFOX
  25. desired_capability['proxy']={
  26. "httpProxy":host,
  27. "httpProxyPort": port
  28. }
  29.  
  30. driver1 = webdriver.Firefox(capabilities=desired_capability)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement