Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-chrome

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-chrome - npm Package Compare versions

Comparing version 0.4.10 to 0.5.0

test/mobile/navigation.js

4

History.md

@@ -6,1 +6,5 @@ ## 版本更新

* 默认时间微调
#### 0.5.0
* 增加page.goBack()、page.goForward()

@@ -6,3 +6,3 @@ "use strict"

const { Keyboard, Mouse, Touch } = require('./Input');
const { logger } = require('./helper');
const { logger } = require('./helper');

@@ -69,2 +69,29 @@ class Page extends Message {

/**
* 返回上一个历史页
*/
async goBack() {
return this.go(-1);
}
/**
* 返回下一个历史页
*/
async goForward() {
return this.go(1)
}
/**
* 返回指定的历史页面
* @param {*} index
*/
async go(index) {
const history = await this.send('Page.getNavigationHistory')
const entry = history.entries[history.currentIndex + index];
if (!entry) return
await this.send('Page.navigateToHistoryEntry', { entryId: entry.id })
}
/**
* 注入包含参数的JS函数,并获取返回值

@@ -71,0 +98,0 @@ * @param {Function} func

2

package.json
{
"name": "auto-chrome",
"version": "0.4.10",
"version": "0.5.0",
"description": "使用Node.js操作Chrome或Chromium,高仿真的用户行为模拟器",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -262,4 +262,11 @@ # auto-chrome

#### page.goBack()
导航到上一个历史标签页
#### page.goForward()
导航到下一个历史标签页
### class: Element

@@ -266,0 +273,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc