Configure Protractor to Run on Firefox with Multiple Capability

In my earlier post, I talked about how to configure protractor to run on Firefox with single capabilities. however what if one needs to run on multiple browsers (whether if it is sequentiallly or parallely). That will be the topic of this post.

So follow the conventions from the earlier post, we will use a separate file that contains the configuration (browserConfig.js):

Here we added mulitBrowsers to include both chrome and firefox to be used later. And to enable multi capability we will add the following to the file protractor.conf.js:

Notice here we are retrieve mulit-capabilities from file browserConfig.js, and assigned to mutiCapabilities instead capabilities.

Also note that we are adding another parameter called maxSessions, this limits the number of sessions is allowed to run at a time, if we want to run one browser at a time, we will want to limit the number of sessions to 1. If we want to run 2 ore more at the same time in paralle, we will want to increase this value to the desired value.

This concludes this post, and hope it will be helpful to you.

 

References:

[1] https://sqa.stackexchange.com/questions/18105/how-to-run-e2e-tests-on-multiple-browsers-in-series

[2] https://stackoverflow.com/questions/22009321/running-e2e-tests-using-protractor-multicapabilities-config-but-limit-max-webdri

[3] https://github.com/angular/protractor/blob/master/docs/browser-setup.md

Leave a Reply

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