@applitools/driver 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/context.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/context.js
CHANGED
|
@@ -352,10 +352,13 @@ class Context {
|
|
|
352
352
|
if (this._scrollingElement) {
|
|
353
353
|
this._scrollingElement = await this.element(this._scrollingElement);
|
|
354
354
|
}
|
|
355
|
-
else {
|
|
355
|
+
else if (this.driver.isWeb) {
|
|
356
356
|
const selector = await this.execute(snippets.getDocumentScrollingElement);
|
|
357
357
|
this._logger.log(`default SRE is ${selector}`);
|
|
358
|
-
this._scrollingElement = await this.element(
|
|
358
|
+
this._scrollingElement = await this.element({ type: 'css', selector });
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
this._scrollingElement = await this.element({ type: 'xpath', selector: '//*[@scrollable="true"]' });
|
|
359
362
|
}
|
|
360
363
|
}
|
|
361
364
|
return this._scrollingElement;
|