From 19f278250c0f1e73c72387b84c241376ee37f077 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Thu, 27 May 2021 12:27:34 +0100 Subject: [PATCH] [ci:force] remove --- e2e/protractor.conf.js | 1 - lib/testing/src/lib/core/pages/viewer.page.ts | 2 +- lib/testing/src/lib/core/utils/browser-actions.ts | 10 ++++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/e2e/protractor.conf.js b/e2e/protractor.conf.js index 01b578225dd..44de30671f9 100644 --- a/e2e/protractor.conf.js +++ b/e2e/protractor.conf.js @@ -137,7 +137,6 @@ exports.config = { shardTestFiles: true, chromeOptions: { - w3c : false, prefs: { 'credentials_enable_service': false, 'download': { diff --git a/lib/testing/src/lib/core/pages/viewer.page.ts b/lib/testing/src/lib/core/pages/viewer.page.ts index 287f5fe5e00..c4313d4cdd3 100644 --- a/lib/testing/src/lib/core/pages/viewer.page.ts +++ b/lib/testing/src/lib/core/pages/viewer.page.ts @@ -209,7 +209,7 @@ export class ViewerPage { async checkCurrentThumbnailIsSelected(): Promise { const selectedThumbnail = element(by.css('adf-pdf-thumb.adf-pdf-thumbnails__thumb.adf-pdf-thumbnails__thumb--selected > img')); - const pageNumber = await BrowserActions.getInputValue(this.pageSelectorInput) + const pageNumber = await BrowserActions.getInputValue(this.pageSelectorInput); await expect('Page ' + pageNumber).toEqual(await selectedThumbnail.getAttribute('title')); } diff --git a/lib/testing/src/lib/core/utils/browser-actions.ts b/lib/testing/src/lib/core/utils/browser-actions.ts index 54209858f25..9ca63626139 100644 --- a/lib/testing/src/lib/core/utils/browser-actions.ts +++ b/lib/testing/src/lib/core/utils/browser-actions.ts @@ -145,10 +145,12 @@ export class BrowserActions { await elementFinder.click(); await elementFinder.sendKeys(protractor.Key.END); - const value = await elementFinder.getAttribute('value'); - for (let i = value.length; i >= 0; i--) { - await elementFinder.sendKeys(protractor.Key.BACK_SPACE); - await browser.sleep(sleepTime); + const value: string = await browser.executeScript(`return arguments[0].value`, elementFinder); + if (value) { + for (let i = value.length; i >= 0; i--) { + await elementFinder.sendKeys(protractor.Key.BACK_SPACE); + await browser.sleep(sleepTime); + } } }