Selenium2 learning: basicConfig()

1.1 The principle of webDriver

The log information captured by basicConfig(). However, the debug mode it opens can only capture the post() request sent by the client like the server, but cannot obtain the response information returned by the server.

from selenium import webdriver

import logging

logging.basicConfig(level = logging.DEBUG)

driver = webdriver.Chrome()

driver.get("http://www.baidu.com")

driver.find_element_by_id('kw').send_keys('selenium')

driver.find_element_by_id('su').click()

driver.quit()

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325801593&siteId=291194637