auto-chrome
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -19,2 +19,5 @@ const Event = require('./Event'); | ||
// 等待初始标签准备就绪 | ||
this.awaitTargetCreated = new zPromise() | ||
} | ||
@@ -29,3 +32,3 @@ async run() { | ||
// 等待this.page初始标签准备就绪 | ||
await this.waitTargetCreated | ||
await this.awaitTargetCreated | ||
@@ -32,0 +35,0 @@ } |
@@ -20,5 +20,2 @@ const EventEmitter = require('events'); | ||
// 等待初始标签准备就绪 | ||
this.waitTargetCreated = new zPromise() | ||
} | ||
@@ -80,2 +77,4 @@ /** | ||
page[object.method](message) | ||
} else { | ||
debugMessageOther(object.method, object.params) | ||
} | ||
@@ -133,10 +132,10 @@ } else { | ||
if (this.ignoreHTTPSErrors) { | ||
this.page.send('Security.enable') | ||
await this.page.send('Security.enable') | ||
} | ||
this.page.send('Page.enable') | ||
await this.page.send('Page.enable') | ||
this.page.send('Runtime.enable') | ||
await this.page.send('Runtime.enable') | ||
this.waitTargetCreated.resolve() | ||
this.awaitTargetCreated.resolve() | ||
@@ -143,0 +142,0 @@ } |
{ | ||
"name": "auto-chrome", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,3 +10,3 @@ const autoChrome = require('../../') | ||
args: ['--start-maximized'], | ||
devtools: false, | ||
devtools: true, | ||
// slowMo: 20, // 减速 | ||
@@ -29,2 +29,4 @@ }) | ||
console.log(key) | ||
let element = elements[key] | ||
@@ -31,0 +33,0 @@ |
@@ -37,3 +37,2 @@ const autoChrome = require('../../') | ||
// await page.click('a[href="https://www.hao123.com"]') | ||
@@ -40,0 +39,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
570187
2870
25