An open API service indexing awesome lists of open source software.

https://github.com/sridharbandi/selenium-protractor-template

Selenium Protractor Example with Page Object Model
https://github.com/sridharbandi/selenium-protractor-template

javascript npm page-object-model protractor selenium-webdriver

Last synced: 7 months ago
JSON representation

Selenium Protractor Example with Page Object Model

Awesome Lists containing this project

README

          

## Selenium Protractor Template with Page Object Model
>[Protractor](https://www.protractortest.org/#/) is an end-to-end test framework for Angular and AngularJS applications.Protractor runs tests against your application running in a real browser, interacting with it as a user would.

### How to use?
Create the Page Objects of your Web application under **_pageobjects_** package, call those Page Objects in tests under **_specs_** package (Sample Page Objects, testcase included in this template)

### How to run?
To install the dependencies issue the below command in project root directory
```javascript
npm install
```
To start the selenium server issue the below command in project root directory
```javascript
./node_modules/.bin/webdriver-manager update
```
and then
```javascript
./node_modules/.bin/webdriver-manager start
```
To run the tests issue the below command
```javascript
npm test
```
By default it runs in Chrome browser, you can specify which browser to use as well
```javascript
npm test -- --browser=firefox
```
Currently supported browsers in this template are
* chrome
* firefox

Other templates you might be interested in
[Non Selenium Javascript Templates](https://github.com/sridharbandi/Non-Selenium-Javascript-Getting-Started-Examples),
[Selenium Javascript Templates](https://github.com/sridharbandi/Selenium-Javascript-Getting-Started-Examples)
> Feel free to modify it to your own needs :)