MCPcopy
hub / github.com/angular/angular / openBrowser

Function openBrowser

modules/utilities/e2e_util.ts:15–32  ·  view source on GitHub ↗
(config: {
  url?: string;
  params?: {name: string; value: any}[];
  ignoreBrowserSynchronization?: boolean;
})

Source from the content-addressed store, hash-verified

13declare var expect: any;
14
15export function openBrowser(config: {
16 url?: string;
17 params?: {name: string; value: any}[];
18 ignoreBrowserSynchronization?: boolean;
19}) {
20 if (config.ignoreBrowserSynchronization) {
21 browser.ignoreSynchronization = true;
22 }
23 const urlParams: string[] = [];
24 if (config.params) {
25 config.params.forEach((param) => urlParams.push(param.name + '=' + param.value));
26 }
27 const url = encodeURI(config.url + '?' + urlParams.join('&'));
28 browser.get(url);
29 if (config.ignoreBrowserSynchronization) {
30 browser.sleep(2000);
31 }
32}
33
34/**
35 * @experimental This API will be moved to Protractor.

Callers 8

runBenchmarkFunction · 0.90
openTreeBenchmarkFunction · 0.85
defer.e2e-spec.tsFile · 0.85

Calls 4

joinMethod · 0.65
getMethod · 0.65
forEachMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…