This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

ts-rpa
TypeScript icon, indicating that this package has built-in type declarations

0.1.17 • Public • Published

NPM Version NPM Downloads Linux Build Dependencies Status

Documentation

Installation

npm i -g ts-rpa

Requirements

Installation

  • chromedriver

Enviroment

export NODE_PATH=$(npm root -g)
export WEB_BROWSER_HEADLESS=true
export GOOGLE_CLIENT_SECRET=************************
export GOOGLE_CLIENT_ID=************-********************************.apps.googleusercontent.com
export WORKSPACE_DIR=./tmp/

# If you plan to use `RPA.GCP` module, you need to set a service account key file.
# https://cloud.google.com/docs/authentication/getting-started
export GOOGLE_APPLICATION_CREDENTIALS=************-************.json

Usage

ts-rpa sample.ts

Sample

import RPA from "ts-rpa";

(async () => {
  try {
    await RPA.WebBrowser.get("https://www.google.com/");
    const input = await RPA.WebBrowser.findElement(".gLFyf");
    await RPA.WebBrowser.sendKeys(input, ["RPA"]);
    const element = await RPA.WebBrowser.findElement(
      ".FPdoLc > center:nth-child(1) > input:nth-child(2)"
    );
    await RPA.WebBrowser.mouseClick(element);
    await RPA.sleep(3000);
    await RPA.WebBrowser.takeScreenshot();
  } catch (error) {
    RPA.SystemLogger.error(error);
  } finally {
    await RPA.WebBrowser.quit();
  }
})();

Readme

Keywords

none

Package Sidebar

Install

npm i ts-rpa

Weekly Downloads

63

Version

0.1.17

License

ISC

Unpacked Size

287 kB

Total Files

94

Last publish

Collaborators

  • hasigo-kosuge
  • nakashima_koki
  • rapwind
  • yasumatsu_noboru