# tarikcurto.node-webdriver

> Webdriver built in Node JS for perform reliable and scalable works on any website.

Latest version **1.0.2** (published 2017-04-27) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install tarikcurto.node-webdriver
pnpm add tarikcurto.node-webdriver
yarn add tarikcurto.node-webdriver
bun add tarikcurto.node-webdriver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-04-27 |
| First published | 2017-04-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | tarikcurto |
| Maintainers | tarikcurto |
| Keywords | util, webdriver, server, client |

## Links

- npm: https://www.npmjs.com/package/tarikcurto.node-webdriver
- Repository: https://github.com/tarikcurto/node-webdriver
- Homepage: https://github.com/tarikcurto/node-webdriver#readme
- Issues: https://github.com/tarikcurto/node-webdriver/issues
- npm.io page: https://npm.io/package/tarikcurto.node-webdriver

## Dependencies (3)

- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [typescript](https://npm.io/package/typescript.md) ^2.2.2
- [tarikcurto.node-terminal](https://npm.io/package/tarikcurto.node-terminal.md) ^2.0.1

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-04-27
- 1.0.1 — 2017-04-27

## README

Welcome to **node-webdriver**
===================

Node-webdriver is an open source tool for **web crawling and testing**, employing Core of PhantomJS.

Current version is developed under **TypeScript OOP** and **modular JS**.

Tool works with events and allows the execution of multiple tasks.

With **node-webdriver** you can perform **reliable and scalable** works on any website.

Let's go to develop!
-------------


First you need [download PhantomJS](http://phantomjs.org/download.html) and **define** it in your system environment as **phantomjs**. 

- Now, we need **node-webdriver**:

```
npm install tarikcurto.node-webdriver
```

```
git clone https://github.com/tarikcurto/node-webdriver.git
```


- Next step is **import webdriver-api module** from JS or TypeScript file:
```
const ApiService =  require('tarikcurto.node-webdriver').ApiService;
```
```
import {ApiService} from "tarikcurto.node-webdriver";
```

- **Instance** api service:
```
let apiService = new ApiService();
```

- Define startup **URL**:
```
apiService.setUrl("https://www.google.es");
```

- Create a **webdriver plugin**.

Webdriver plugins are task containers that are used to evaluate scripts on a website.

Plugins works with web page events (onWebPageRequestedFile, onWebPageChanged...). See full events list on `src/phantom/interface/plugin.interface.ts`.

```
import {PluginService, PluginInterface} from "tarikcurto.node-webdriver";

export class SampleWebdriverPlugin extends PluginService implements PluginInterface {

    public constructor() {
        super();
    }

    onWebPageOpen(status: string){

		console.log("Page status is " + status);
    }
}
```

- **Add plugin** to execution:
```
apiService.addPlugin("SampleWebdriverPlugin", __dirname + "/SampleWebdriverPlugin.js");
```

- Define **work path** (optional):
```
apiService.setWorkPath("C:\\tmp");
```

- And finally, **execute node-webdriver**!:
```
let result: string = apiService.build();
```

For bugs
-------------

- You can open a issue on [tarikcurto/node-webdriver issue](https://github.com/tarikcurto/node-webdriver/issues/new).

About me
-------------

- I am a passionate developer of 20 years that currently lives in Spain. 
-  You can contact me through [centro.tarik@live.com](mailto:centro.tarik@live.com)!

---
_Source: https://npm.io/package/tarikcurto.node-webdriver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
