本文整理匯總了TypeScript中protractor.browser.navigate方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser.navigate方法的具體用法?TypeScript browser.navigate怎麽用?TypeScript browser.navigate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.browser
的用法示例。
在下文中一共展示了browser.navigate方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('Performing action "add" on "texts"', () => {
// Navigate back to Project Page
browser.navigate().back();
browser.navigate().back();
expect<any>(projectPage.notice.list.count()).toBe(0);
projectPage.addNewText(constants.testText3Title, projectPage.testData.simpleUsx1);
projectPage.notice.waitToInclude('The text \'' + constants.testText3Title + '\' was added successfully');
projectPage.notice.firstCloseButton.click();
});
示例2: it
it('can use the chapter trimmer to trim the USX when creating a new text', () => {
const newTextTitle = sampleTitle + '6789'; // Don't re-use title from an existing text
expect<any>(projectPage.newText.showFormButton.isDisplayed()).toBe(true);
projectPage.newText.showFormButton.click();
browser.wait(ExpectedConditions.visibilityOf(projectPage.newText.title), constants.conditionTimeout);
projectPage.newText.title.sendKeys(newTextTitle);
Utils.sendText(projectPage.newText.usx, projectPage.testData.longUsx1);
projectPage.newText.verseRangeLink.click();
browser.wait(ExpectedConditions.visibilityOf(projectPage.newText.fromChapter), constants.conditionTimeout);
projectPage.newText.fromChapter.sendKeys('1');
projectPage.newText.fromVerse.sendKeys('1');
projectPage.newText.toChapter.sendKeys('1');
projectPage.newText.toVerse.sendKeys('3');
projectPage.newText.saveButton.click();
expect<any>(SfProjectPage.textLink(newTextTitle).isDisplayed()).toBe(true);
SfProjectPage.textLink(newTextTitle).click();
expect(questionListPage.textContent.getText()).not.toMatch('/Cana of Galilee/');
browser.navigate().back();
// clean up the text
util.setCheckbox(projectPage.getFirstCheckbox(), true);
const archiveButton = projectPage.archiveTextButton.getWebElement();
archiveButton.click();
Utils.clickModalButton('Archive');
});
示例3: it
it('can change properties and verify they persist', () => {
projectSettingsPage.projectTab.name.clear();
projectSettingsPage.projectTab.name.sendKeys(newName);
projectSettingsPage.projectTab.allowAudioDownload.click();
projectSettingsPage.projectTab.saveButton.click();
browser.navigate().refresh();
projectSettingsPage.tabs.project.click();
expect(projectSettingsPage.projectTab.name.getAttribute('value')).toBe(newName);
expect(projectSettingsPage.projectTab.allowAudioDownload.getAttribute('checked')).toBeFalsy();
projectSettingsPage.get(newName);
projectSettingsPage.tabs.project.click();
projectSettingsPage.projectTab.name.clear();
projectSettingsPage.projectTab.name.sendKeys(constants.testProjectName);
projectSettingsPage.projectTab.saveButton.click();
});
示例4: it
it('can re-publish the question that was just archived (Text Settings)', () => {
SfTextPage.clickTextSettingsButton();
browser.wait(ExpectedConditions.visibilityOf(textSettingsPage.tabs.archiveQuestions),
constants.conditionTimeout);
textSettingsPage.tabs.archiveQuestions.click();
browser.wait(ExpectedConditions.visibilityOf(textSettingsPage.archivedQuestionsTab.questionLink(questionTitle)),
constants.conditionTimeout);
expect<any>(textSettingsPage.archivedQuestionsTab.questionLink(questionTitle).isDisplayed()).toBe(true);
const publishButton = textSettingsPage.archivedQuestionsTab.publishButton.getWebElement();
expect<any>(publishButton.isDisplayed()).toBe(true);
expect<any>(publishButton.isEnabled()).toBe(false);
util.setCheckbox(textSettingsPage.archivedQuestionsTabGetFirstCheckbox(), true);
expect<any>(publishButton.isEnabled()).toBe(true);
publishButton.click();
expect<any>(textSettingsPage.archivedQuestionsTab.questionLink(questionTitle).isPresent()).toBe(false);
expect<any>(publishButton.isEnabled()).toBe(false);
browser.navigate().back();
expect<any>(SfTextPage.questionLink(questionTitle).isDisplayed()).toBe(true);
});
示例5:
browser.waitForAngular();
browser.waitForAngular('');
browser.findElement('');
browser.findElements('');
browser.isElementPresent('');
browser.addMockModule('', '');
browser.addMockModule('', '', ['','']);
browser.addMockModule('', () => {});
browser.addMockModule('', () => {}, ['','']);
browser.clearMockModules();
browser.removeMockModule('');
browser.getRegisteredMockModules();
browser.get('url');
browser.refresh();
browser.refresh(100);
browser.navigate();
browser.setLocation('url');
browser.getLocationAbsUrl();
browser.debugger();
browser.enterRepl();
browser.enterRepl(100);
browser.pause();
browser.pause(100);
browser.actions();
browser.wait('condition');
browser.wait('condition', 100);
browser.wait('condition', 100, 'message');
browser.getCurrentUrl();
browser.getTitle();
browser.takeScreenshot();
by.addLocator('name', () => {});
示例6: clickBrowserBackButton
export async function clickBrowserBackButton() {
return browser.navigate().back();
}