e2e/src/utils/pagination.po.ts
E2E Pagination Object.
Methods |
get |
get()
|
Defined in e2e/src/utils/pagination.po.ts:14
|
Get the pagination bloc
Returns :
any
|
getButtonByPage | ||||||||
getButtonByPage(page: number)
|
||||||||
Defined in e2e/src/utils/pagination.po.ts:23
|
||||||||
Get the page button
Parameters :
Returns :
any
|
getCurrentText |
getCurrentText()
|
Defined in e2e/src/utils/pagination.po.ts:47
|
Get the text of the current page
Returns :
any
|
getNext |
getNext()
|
Defined in e2e/src/utils/pagination.po.ts:40
|
Get the next button
Returns :
any
|
getPrevious |
getPrevious()
|
Defined in e2e/src/utils/pagination.po.ts:32
|
Get the previous button
Returns :
any
|
import { by, element } from 'protractor';
/**
* E2E Pagination Object.
*
* @author Damien Vitrac
*/
export class Pagination {
/**
* Get the pagination bloc
* @returns {ElementFinder}
*/
get() {
return element(by.css('#pagination'));
}
/**
* Get the page button
* @param {number} page
* @returns {ElementFinder}
*/
getButtonByPage(page: number) {
const lis = element.all(by.css('#pagination ul li'));
return lis.get(page).$('a');
}
/**
* Get the previous button
* @returns {ElementFinder}
*/
getPrevious() {
return element(by.css('#pagination .pagination-previous a'));
}
/**
* Get the next button
* @returns {ElementFinder}
*/
getNext() {
return element(by.css('#pagination .pagination-next a'));
}
/**
* Get the text of the current page
*/
getCurrentText() {
return element(by.css('#pagination .current')).getText();
}
}