Skip to content

Instantly share code, notes, and snippets.

@oberlies
oberlies / webdriver.js
Last active August 29, 2015 14:01
Flip through pages of SAPUI5 table using WebdriverJS
var webdriverjs = require('webdriverjs');
var client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs', screenResolution: '1024x768'} });
client.init();
function goToLastPage(tableId, currentPage) {
client.click('#'+tableId+'-paginator--forwardLink', function(err) {
if (err) {
if (err.status === 7) {
// there is no paginator element so we already are on the last page