Skip to content

Commit ab70ad5

Browse files
kobenguyentDavertMik
authored andcommitted
update the deprecated method of wdio v5 (#1519)
1 parent 3f4dd3e commit ab70ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/helper/WebDriver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ class WebDriver extends Helper {
12441244
const elem = usingFirstElement(res);
12451245
const elementId = getElementId(elem);
12461246
if (this.browser.isMobile) return this.browser.touchScroll(elementId, offsetX, offsetY);
1247-
const location = await this.browser.getElementLocation(elementId);
1247+
const location = await elem.getLocation();
12481248
assertElementExists(location, 'Failed to receive', 'location');
12491249
/* eslint-disable prefer-arrow-callback */
12501250
return this.browser.execute(function (x, y) { return window.scrollTo(x, y); }, location.x + offsetX, location.y + offsetY);

0 commit comments

Comments
 (0)