本文整理汇总了TypeScript中e2e_util/e2e_util.openBrowser函数的典型用法代码示例。如果您正苦于以下问题:TypeScript openBrowser函数的具体用法?TypeScript openBrowser怎么用?TypeScript openBrowser使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了openBrowser函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: openTreeBenchmark
function openTreeBenchmark(benchmark: Benchmark) {
let params = [{name: 'depth', value: 4}];
if (benchmark.extraParams) {
params = params.concat(benchmark.extraParams);
}
browser.rootEl = RootEl;
openBrowser({
url: benchmark.url,
ignoreBrowserSynchronization: benchmark.ignoreBrowserSynchronization,
params: params,
});
}
示例2: testTreeBenchmark
function testTreeBenchmark(openConfig: {url: string, ignoreBrowserSynchronization?: boolean}) {
openBrowser({
url: openConfig.url,
ignoreBrowserSynchronization: openConfig.ignoreBrowserSynchronization,
params: [{name: 'depth', value: 4}],
});
$('#createDom').click();
expect($('#root').getText()).toContain('0');
$('#createDom').click();
expect($('#root').getText()).toContain('A');
$('#destroyDom').click();
expect($('#root').getText()).toEqual('');
}
示例3: it
it('should work for ng2 next detect changes', () => {
let params = [
{name: 'depth', value: 4},
// Can't use bundles as we use non exported code
{name: 'bundles', value: false}
];
openBrowser({
url: 'all/benchmarks/src/tree/ng2_next/index.html',
ignoreBrowserSynchronization: true, params
});
$('#detectChanges').click();
expect($('#numberOfChecks').getText()).toContain('10');
});
示例4: testLargeformBenchmark
function testLargeformBenchmark(
openConfig: {url: string, ignoreBrowserSynchronization?: boolean}) {
openBrowser({
url: openConfig.url,
params: [{name: 'copies', value: 1}],
ignoreBrowserSynchronization: openConfig.ignoreBrowserSynchronization,
});
$('#createDom').click();
expect(element.all(By.css('input[name=value0]')).get(0).getAttribute('value'))
.toBe('someValue0');
$('#destroyDom').click();
expect(element.all(By.css('input[name=value0]')).count()).toBe(0);
}
示例5: testTreeBenchmark
function testTreeBenchmark(openConfig: {
url: string,
ignoreBrowserSynchronization?: boolean,
extraParams?: {name: string, value: any}[]
}) {
let params = [{name: 'depth', value: 4}];
if (openConfig.extraParams) {
params = params.concat(openConfig.extraParams);
}
openBrowser({
url: openConfig.url,
ignoreBrowserSynchronization: openConfig.ignoreBrowserSynchronization,
params: params,
});
$('#createDom').click();
expect($('#root').getText()).toContain('0');
$('#createDom').click();
expect($('#root').getText()).toContain('A');
$('#destroyDom').click();
expect($('#root').getText()).toEqual('');
}