This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { browser, by, ElementFinder, Key, promise, WebElement } from 'protractor'; | |
import { hideMobileKeyboard } from './mobile'; | |
import fullyResolved = promise.fullyResolved; | |
export const scrollToElement = (element: WebElement): promise.Promise<void> => { | |
return ( | |
hideMobileKeyboard() | |
// Using scrollIntoView because it scrolls until the element is really in the viewport | |
// The common recommended way 'browser.actions().mouseMove(element).perform()' does not consider overlapping layers | |
// and does not work in all browsers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist: trusty | |
sudo: required | |
language: node_js | |
node_js: | |
- "7" | |
os: | |
- linux | |
env: | |
global: | |
- DBUS_SESSION_BUS_ADDRESS=/dev/null |