Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python selenium console log

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

# enable browser logging
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = { 'browser':'ALL' }
driver = webdriver.Chrome(desired_capabilities=d)

# load the desired webpage
driver.get('http://foo.com')

# print messages
for entry in driver.get_log('browser'):
    print(entry)
Comment

PREVIOUS NEXT
Code Example
Python :: python load file with multiple jsons 
Python :: Nearest neighbors imputation 
Python :: null in python 
Python :: join function python 
Python :: run python3 script in pytgon 
Python :: how to add hyperlink in jupyter notebook 
Python :: pandas assign multiple columns at once 
Python :: Changing default fonts in matploitlibrc file 
Python ::  
Python :: django model choice field from another model 
Python :: detect gender from name 
:: wkhtmltopdf pdfkit blocked access to file 
Python :: functools.cached_property objects in python 
Python :: how to print python exception message 
Python :: pandas python example 
Python :: python dictionary print key value ascending order 
Python :: python date time 
Python :: connect with database python 
Python :: pandas set hour for timestamp 
Python :: create sqlite table in python 
Python :: remove figure label 
Python :: python with braces 
Python :: binary search tree in python 
Python :: closures in python 
Python :: nrf24l01 arduino to raspberry pi struct 
Python :: python match case 
Python :: how to check how many key value pairs are in a dict python 
Python :: django run command from code 
Python :: python post request multi argument 
Python :: check if boolean is true python 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =