0.2.15 • Published 11 months ago

pp-robot-module v0.2.15

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Installation

npm i pp-robot-module

Requirements

Installation

  • nodejs v16.20
  • vscode v1.75+
  • vscode extension pp-robot-ide v1.0.0+

Enviroment

查看.env文件

Sample

const { MR } = require('pp-robot-module');
(async () => {
    await MR.Web.launch()
    await MR.Web.goto('http://example.com/')
    await MR.sleep(3000)
    const headerFrame = await MR.Web.frame('headerFrame')
    await headerFrame.getByRole('link', { name: '登录' }).click()
    const cs= await MR.Web.cookies()
    console.log(cs)
    const conFrame = await MR.Web.frame('conFrame')
    await conFrame.locator('#loginname').fill('test')
    await MR.Web.close()
})()