auto-chrome
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -78,7 +78,7 @@ "use strict"; | ||
*/ | ||
async newPage(url = 'about:newtab') { | ||
async newPage(url = 'about:newtab', time) { | ||
await Promise.all([ | ||
this.send('Target.createTarget', { url }), | ||
this.autoNav() | ||
this.autoNav(time) | ||
]); | ||
@@ -85,0 +85,0 @@ |
@@ -228,3 +228,3 @@ "use strict"; | ||
*/ | ||
async oncePromise(name, callback, timer = 3000) { | ||
oncePromise(name, callback, timer = 3000) { | ||
@@ -231,0 +231,0 @@ const promise = new timerPromise(timer); |
@@ -289,3 +289,3 @@ "use strict"; | ||
*/ | ||
async clickNav() { | ||
async clickNav(time = 3000) { | ||
@@ -301,3 +301,3 @@ const result = await this.getBoundingRect(); | ||
await Promise.all([ | ||
this.page.chrome.autoNav(3000), | ||
this.page.chrome.autoNav(time), | ||
this.page.clicker.click(x, y) | ||
@@ -304,0 +304,0 @@ ]) |
@@ -78,6 +78,6 @@ "use strict"; | ||
*/ | ||
async goto(url = 'about:newtab') { | ||
async goto(url = 'about:newtab', time) { | ||
const result = await Promise.all([ | ||
this.chrome.autoNav(), | ||
this.chrome.autoNav(time), | ||
this.send('Page.navigate', { url }) | ||
@@ -84,0 +84,0 @@ ]).catch(() => { |
{ | ||
"name": "auto-chrome", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
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
86308