protractor-multibrowser
v1.0.5
Published
> Support for multiple different browsers within a single protractor test. Used for integration tests which involve websites that don't all support the same browsers. Test a customer facing site in IE and an internal site in Chrome as one unified test.
Downloads
9
Maintainers
Readme
Protractor Multibrowser Support
Support for multiple different browsers within a single protractor test. Used for integration tests which involve websites that don't all support the same browsers. Test a customer facing site in IE and an internal site in Chrome as one unified test.
Quick Usage Overview
Use var PMB = require("protractor-multibrowser/protractor-multibrowser.js");
to import the package feature set into a protractor test case file.
Use PMB.initAuxBrowser()
to initialize a secondary browser which can be different from the starting browser.
Use PMB.runAuxBrowser()
to run protractor commands on the secondary browser.
Documentation
Visit and clone the demo repository here
initAuxBrowser
| Parameter | Description | | --- | --- | | url | The starting url (provide a string in the event a baseUrl is not specified in the conf object) | | conf | Configuration object for the secondary browser | | nonAngularSite | Set to true when the intended site is not made with Angular | | windowLayout | Determine the layout of the browsers on the screen (optional) |
const auxBrowser = PMB.initAuxBrowser(
'https://www.protractortest.org/#/',
auxConf,
true,
PMB.windowLayouts.MAXIMIZE
);
runAuxBrowser
| Parameter | Description | | --- | --- | | auxBrowser | Initialized secondary browser returned by the initAuxBrowser() function | | testCaseCmds | Function housing the test case commands, remember to use auxBrowser.element(); inside of function | | timeoutInMS | Set the max wait time for test case before failure (optional) |
PMB.runAuxBrowser(
auxBrowser,
() => {
auxBrowser.element(by.id("drop1")).click();
},
45000
);