#!/usr/bin/python3
# -*- coding:utf-8 -*-
# author:Mike
# datetime:2019/2/16 13:33
# software: PyCharm
from selenium import webdriver
import time
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
# browser = webdriver.Chrome()
d = DesiredCapabilities.CHROME
d['loggingPrefs'] = {'browser':'ALL'}
browser = webdriver.Chrome(desired_capabilities=d)
browser.get('https://www.taobao.com/')
browser.execute_script('console.log(window.navigator.webdriver+"hello")')
print(browser.get_log('browser'))
browser.quit()