We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e943779 commit 807b4f5Copy full SHA for 807b4f5
javascript/node/selenium-webdriver/lib/webdriver.js
@@ -989,7 +989,7 @@ class WebDriver {
989
* @private
990
*/
991
findElementInternal_(locatorFn, context) {
992
- return this.call(() => locatorFn(context)).then(function(result) {
+ return Promise.resolve(locatorFn(context)).then(function(result) {
993
if (Array.isArray(result)) {
994
result = result[0];
995
}
@@ -1029,7 +1029,7 @@ class WebDriver {
1029
1030
1031
findElementsInternal_(locatorFn, context) {
1032
1033
if (result instanceof WebElement) {
1034
return [result];
1035
0 commit comments