auto-chrome
Advanced tools
Comparing version 0.4.9 to 0.4.10
@@ -37,7 +37,7 @@ "use strict" | ||
chromeProcess.once('exit', () => { | ||
logger.success('浏览器关闭'); | ||
logger.log('浏览器关闭'); | ||
}); | ||
chromeProcess.once('message', (message) => { | ||
console.log("message", message); | ||
logger.log("message", message); | ||
}); | ||
@@ -44,0 +44,0 @@ |
@@ -264,3 +264,3 @@ "use strict" | ||
await sleep(600) | ||
await sleep(500) | ||
@@ -267,0 +267,0 @@ return await this.page.keyboard.type(text, options) |
@@ -6,3 +6,3 @@ "use strict" | ||
const zPromise = require('zpromise') | ||
const timechain = new timeChain({ delay: 5000 }) | ||
const timechain = new timeChain({ delay: 10000 }) | ||
@@ -20,2 +20,2 @@ module.exports = { | ||
}, | ||
}; | ||
} |
@@ -143,10 +143,12 @@ "use strict" | ||
async type(text, options = {}) { | ||
let { delay = 100 } = options | ||
let { delay = 80 } = options | ||
for (const char of text) { | ||
if (keyDefinitions[char]) | ||
if (keyDefinitions[char]) { | ||
await this.press(char, { delay: 20 }); | ||
else | ||
} else { | ||
await this.sendCharacter(char); | ||
if (delay) | ||
} | ||
if (delay) { | ||
await new Promise(f => setTimeout(f, delay)); | ||
} | ||
} | ||
@@ -153,0 +155,0 @@ } |
@@ -92,3 +92,3 @@ "use strict" | ||
await this.send('Page.handleJavaScriptDialog', { accept: false }); | ||
logger.success(`关闭${data.type}对话框`, data.message) | ||
logger.log(`关闭${data.type}对话框`, data.message) | ||
} | ||
@@ -95,0 +95,0 @@ /** |
{ | ||
"name": "auto-chrome", | ||
"version": "0.4.9", | ||
"version": "0.4.10", | ||
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器", | ||
@@ -14,3 +14,3 @@ "main": "index.js", | ||
"debug": "^3.1.0", | ||
"loggercc": "^1.2.9", | ||
"loggercc": "^1.2.10", | ||
"timechain": "^1.2.0", | ||
@@ -17,0 +17,0 @@ "ws": "^6.0.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
570815
50
2870
Updatedloggercc@^1.2.10