From 55d921e646d913801486fb4e70ceced8a9c46029 Mon Sep 17 00:00:00 2001 From: Thanh Nguyen Date: Fri, 22 Feb 2019 15:29:12 +0100 Subject: [PATCH] update the deprecated method of wdio v5 --- lib/helper/WebDriver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/WebDriver.js b/lib/helper/WebDriver.js index 573bad4a3..93addf623 100644 --- a/lib/helper/WebDriver.js +++ b/lib/helper/WebDriver.js @@ -1245,7 +1245,7 @@ class WebDriver extends Helper { const elem = usingFirstElement(res); const elementId = getElementId(elem); if (this.browser.isMobile) return this.browser.touchScroll(elementId, offsetX, offsetY); - const location = await this.browser.getElementLocation(elementId); + const location = await elem.getLocation(); assertElementExists(location, 'Failed to receive', 'location'); /* eslint-disable prefer-arrow-callback */ return this.browser.execute(function (x, y) { return window.scrollTo(x, y); }, location.x + offsetX, location.y + offsetY);