Run protractor test on firefox browser – webstorm ide

In one of our post Protractor test on chrome browser, we have seen how to run protractor tests in chrome browser (using VSCode IDE), in this post we will be using WebStorm IDE [just to get a difference experience] to run protractor tests on firefox browser

Let’s see the implementation step by step

Download and install

Download webstorm ide here and install.

Open ide, click on File | New | Project [enter folder path and project name]

tsconfig.json

Create a new file – Right click on the project, click New | File and name it as “tsconfig.json”

All the .ts files will be converted to .js file under tmp folder

package.json

Create a new file and name is as “package.json”

Firefox browser version – 56

Firefox driver version – 0.19.1

Protractor version – 5.1.2

conf.ts

Same way, create another file with name “conf.ts”

spec.ts

Let’s create test case or script, create a new file with name “spec.ts”

So we have now 4 files to get started with

open the local terminal (Alt + F12) in webstorm and

Run 1st command

npm install

this will install all the dependencies needed to run protractor test [this command will create a new folder “node_modules” under your project directory]

Run 2nd command

webdriver-manager start

Wait till it shows “Selenium Server is up and running”

Then open another terminal, click on + symbol and

Run 3rd command

npm test

This will open the firefox browser and run the script

Output:

 

Content posted is based on learning or working experience, Share the post with others if find useful, Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: