This commit is contained in:
aozhiwei 2019-10-12 11:12:52 +08:00
parent 94bed8db9f
commit 2615ae34f7

View File

@ -5,10 +5,7 @@ import scriptmgr
#os.environ['DEBUG'] = '1'
browser = pychrome.Browser(url="http://192.168.100.137:9223")
tab = browser.new_tab()
scriptmgr = scriptmgr.ScriptMgr(tab)
tab.start()
def initTab(tab):
tab.call_method("Network.enable", maxPostDataSize=65536)
tab.call_method("Page.enable")
tab.call_method("Page.getResourceTree")
@ -19,6 +16,12 @@ tab.call_method("DOM.enable")
tab.call_method("CSS.enable")
tab.call_method("Overlay.enable")
tab.call_method("Log.enable")
browser = pychrome.Browser(url="http://192.168.100.137:9223")
tab = browser.new_tab()
scriptmgr = scriptmgr.ScriptMgr(tab)
initTab(tab)
tab.start()
tab.call_method("Page.navigate", url="http://localhost:7456/", _timeout=5)
while True: