本文整理汇总了TypeScript中protractor.browser.driver.manage方法的典型用法代码示例。如果您正苦于以下问题:TypeScript browser.driver.manage方法的具体用法?TypeScript browser.driver.manage怎么用?TypeScript browser.driver.manage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.browser.driver
的用法示例。
在下文中一共展示了browser.driver.manage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeAll
beforeAll(() => {
if (environment === "localDebug") {
password = "Pa$$w0rd";
baseUrl = "http://localhost:8080/";
} else {
password = realPassword;
baseUrl = "http://ca-london.org/";
if (environment !== "production") {
baseHref = environment;
}
for (const username in usernames) {
usernames[username] = "it@ca-london.org";
}
}
browser.driver.manage().deleteAllCookies();
browser.driver.manage().window().maximize();
browser.get(`${baseUrl}${baseHref}`);
});
示例2: setBrowserMode
export async function setBrowserMode(mode: BrowserMode) {
let window = browser.driver.manage().window();
switch (mode) {
case BrowserMode.Phone:
await window.setSize(430, 667);
break;
case BrowserMode.Tablet:
await window.setSize(768, 1024);
break;
case BrowserMode.Desktop:
await window.setSize(1920, 1080);
break;
default:
throw Error('Unknown mode');
}
}
示例3: beforeAll
beforeAll(function () {
browser.driver.manage().deleteAllCookies();
browser.wait(() => tribeCollection.drop()
.then(() => tribeCollection.insert([
{
id: 'e2e1',
name: 'E2E Example Tribe 1'
}, {
id: 'e2e2',
name: 'E2E Example Tribe 2'
}
]))
.then(() => authorizeAllTribes())
.then(() => tribeCollection.find({}, {}))
.then(tribesInCollection => {
tribeDocuments = tribesInCollection;
return true;
}));
browser.get(hostName + '/test-login?username=' + userEmail + '&password="pw"');
});
示例4:
onPrepare: () => {
browser.driver.manage().window().maximize();
},
示例5: expect
checkLeftPanelMini: () => {
browser.driver.manage().window().setSize(800, 600);
browser.sleep(500);
expect(menuLeftMini.isDisplayed()).toBeTruthy();
},
示例6: beforeEach
beforeEach(async() => {
await browser.get('http://localhost:4200')
let width = 1280;
let height = 900;
await browser.driver.manage().window().setSize(width, height);
});