I am trying to capture the console log of Firefox using Selenium but I am getting "HTTP method not allowed" error
This is how I am doing it currently:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
# enable browser logging
d = DesiredCapabilities.FIREFOX
d['loggingPrefs'] = {'browser': 'ALL'}
driver = webdriver.Firefox(capabilities=d)
# load some site
driver.get('url')
# print messages
for entry in driver.get_log('browser'):
print entry
The error I am getting is selenium.common.exceptions.WebDriverException: Message: HTTP method not allowed
get_log is not implemented by Firefox driver. See https://github.com/mozilla/geckodriver/issues/330
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With