A Bootstrap for Selenium3.0. just only install this, you can E2E automation testing.
Installation
yarn add selen
or
npm i selen -D
Usage
selen.run()
is an simple API which launch Browser. Both of generator function
and normal function with prommise
are supported.(Below example is written generator function
)
index.js
const Selen = ;const selen = browserName: 'chrome';selen;
node index.js
Features
Basically, you don't need setup other special for Selenium except for this
Originally, below things is required to be worked Selenium
- Download & Install Selenium Standalone
- Launch Selenium Standalone Server
- Download & Set PATH for driver binary of each browsers(except for safari10~)
Fully Inherit native Webdriver for NodeJS
So writable native Webdriver for NodeJS in function selen.run
Better APIs than native Webdriver API
driver.executeScript
and driver.executeAsyncScript
Problem of The problem is that they are should to be passed as string like below.
driver;driver
this.executeScript
this;
example
this;
this.executeAsyncScript
this;
example
this;
this.takeScreenshot
this;
this;// -> save screenshot into specified path
- Emulating fullpage screenshot with scrolling page for browsers which is not support fullpage screenshot(e.g. chrome).
- Unnecessary to write
fs.writeFile' or
fs.writeFileSync` by yourself to save screenshot image..
Roadmap
v.0.9.3
- remove some dependencies of Mocha and MOCHAWESOME for working as simple Selenium
v.0.9.0
- add custom takeScreenshot API
v.1.0.0
- support windows OS and browsers
- add function output browser logs
Changed log
None.
Services for Remote Testing and Multi Devices Testing
In the same way as native Webdriver, if you specify the service unique capability, then you can use these services.
They are awesome cloud testing services using real browsers and devices.
Dependencies
- Node.js (v7.5.0 is checked)
- JRE 1.8~
- Selenium Webdriver for NodeJS
- Selenium Standalone