T
T
trunin2019-01-16 18:24:30
Python
trunin, 2019-01-16 18:24:30

Error while requesting browser logs in selenium?

Good afternoon, I'm trying to remove the logs from the browser console
in chrome, everything is ok, but there are problems in mozilla and edge.
What am I doing wrong?

caps = DesiredCapabilities.FIREFOX
caps['loggingPrefs'] = {'performance': 'ALL', 'browser': 'ALL'}
wd = webdriver.Firefox(desired_capabilities=caps)

wd.get('http://ya.ru')

print(wd.get_log('browser'))

caps = DesiredCapabilities.EDGE
caps['loggingPrefs'] = {'performance': 'ALL', 'browser': 'ALL'}
wd = webdriver.Edge(capabilities=caps)

wd.get('http://ya.ru')

print(wd.get_log('browser'))

Traceback (most recent call last):
  File "C:/Users/trune/PycharmProjects/vctests/asd.py", line 6, in <module>
    wd = webdriver.Edge(capabilities=caps)
  File "C:\Users\trune\PycharmProjects\vctests\venv\lib\site-packages\selenium\webdriver\edge\webdriver.py", line 66, in __init__
    desired_capabilities=capabilities)
  File "C:\Users\trune\PycharmProjects\vctests\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\trune\PycharmProjects\vctests\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\trune\PycharmProjects\vctests\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\trune\PycharmProjects\vctests\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 208, in check_response
    raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Unknown error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
1
1001001, 2019-01-16
@1001001

The driver for Firefox does not support this functionality, apparently age too

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question