# protractor-multibrowser

> > 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.

Latest version **1.0.5** (published 2020-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install protractor-multibrowser
pnpm add protractor-multibrowser
yarn add protractor-multibrowser
bun add protractor-multibrowser
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-03-22 |
| First published | 2020-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Linus Stern |
| Maintainers | linusstern |
| Keywords | protractor-multibrowser, protractor, browser, npm, package, linus, linusstern |

## Links

- npm: https://www.npmjs.com/package/protractor-multibrowser
- npm.io page: https://npm.io/package/protractor-multibrowser

## Dependencies (2)

- [protractor](https://npm.io/package/protractor.md) ^5.4.2
- [selenium-webdriver](https://npm.io/package/selenium-webdriver.md) ^4.0.0-alpha.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2020-03-22
- 1.0.4 — 2020-03-22
- 1.0.3 — 2020-03-22
- 1.0.2 — 2020-03-22
- 1.0.1 — 2020-03-22
- 1.0.0 — 2020-03-22

## 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 <a href="https://github.com/LinusStern/protractor-multibrowser-demo">here</a>

**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)                                  |

```javascript
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(<locator>);* inside of function |
| timeoutInMS  | Set the max wait time for test case before failure (optional)                                                |

```javascript
PMB.runAuxBrowser(
    auxBrowser, 
    () => {
        auxBrowser.element(by.id("drop1")).click();
    }, 
    45000
);
```

---
_Source: https://npm.io/package/protractor-multibrowser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
