Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,21 @@ export class ProtractorBrowser {
return this.get(href, opt_timeout);
}

/**
* @see webdriver.WebDriver.refresh
*
* Makes a reload of the current page.
*
* Method calls location.reload function of browsers
*/
async reload() {
if (!await this.waitForAngularEnabled()) {
return this.driver.navigate().refresh();
}

return this.executeScriptWithDescription('return location.reload()', 'Protractor reload page');
}

/**
* Mixin navigation methods back into the navigation object so that
* they are invoked as before, i.e. driver.navigate().refresh()
Expand Down
4 changes: 2 additions & 2 deletions lib/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ export class ElementArrayFinder extends WebdriverWebElement {
}

/**
* Get an element within the ElementArrayFinder by index. The index starts at
* 0. Negative indices are wrapped (i.e. -i means ith element from last)
* Get an element within the ElementArrayFinder by index. The index starts at 0.
* Negative indices are wrapped (i.e. -i means ith element from last)
* This does not actually retrieve the underlying element.
*
* @alias element.all(locator).get(index)
Expand Down