Last active
July 25, 2018 13:31
-
-
Save jimode/152a2bbac9ad8fe8a9c653debd4abdd5 to your computer and use it in GitHub Desktop.
Get location co-ordinates of elements and get browser to scroll to it.
This file contains hidden or 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
// Webdriver.IO | |
const [x, y] = Object.values(this.cardPaymentOption.getLocation()); | |
browser.scroll(x, y); | |
this.cardPaymentOption.click(); | |
const [x1, y1] = Object.values(this.ccSecureCheckoutText.getLocation()); | |
browser.scroll(x1, y1); | |
this.ccSecureCheckoutText.waitForVisible(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment