Page
Summary
Defines a web page to help writing end to end tests with protractor for OpenVeo.
Do not use this directly but extend it.
Constructor
Page
Syntax
Page
()
Summary
Example:
var Page = require('@openveo/test').e2e.pages.Page;
function MyPage() {
MyPage.super_.call(this);
this.path = 'be/myPage';
}
module.exports = MyPage;
util.inherits(MyPage, Page);
var page = new MyPage();
page.load().then(function() {
console.log('Page fully loaded');
});
Item Index
Properties
Methods
deleteCookies
Syntax
Summary
Removes all cookies on the actual page.
Returns:
Promise resolving when all cookies are deleted
getPath
Syntax
Summary
Helper Url Get only current url path without host
Returns:
Promise resolving with current path
getTitle
Syntax
Summary
Gets page title as described by the HTMLTitleElement.
Returns:
Promise resolving with the title of the page
Example:
// With MyPage extending Page
var page = new MyPage();
assert.eventually.equal(page.getTitle(), 'My page title');
load
Syntax
Summary
Loads the page.
Returns:
Promise resolving when the page is fully loaded
Example:
var Page = require('@openveo/test').e2e.pages.Page;
function MyPage() {
MyPage.super_.call(this);
this.path = 'be/myPage';
}
module.exports = MyPage;
util.inherits(MyPage, Page);
var page = new MyPage();
page.load().then(function() {
console.log('Page fully loaded');
});
onLoaded
Syntax
Summary
Handles page loaded.
Use this method to perform actions after the page is loaded. Typically, verify that the page is loaded by waiting for elements to be present on the page.
By default it does nothing, override it to define your own behaviour.
Returns:
Promise resolving when the page is fully loaded
Properties
bodyElement
Syntax
bodyElement
ElementFinder
final
Summary
Body element.
EC
Syntax
EC
ExpectedConditions
final
Summary
Protractor expected conditions.
flow
Syntax
flow
ControlFlow
final
Summary
Protractor control flow.
pageElement
Syntax
pageElement
ElementFinder
final
Summary
Page element.
Page wrapper holding the content scrollbar.