Skip to content

Commit

Permalink
fixed global element api to work with element properties as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
yashPratp983 committed Aug 7, 2023
1 parent 5f87d1d commit d45e64f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/api/_loaders/element-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class ElementGlobal {

static element({locator, testSuite, client, options}) {
const instance = new ElementGlobal({testSuite, client, options});
const byInstance=Locator.create(locator);
instance.setLocator(byInstance);
instance.setLocator(locator);

return instance.exported();
}
Expand Down Expand Up @@ -88,7 +87,9 @@ class ElementGlobal {
return;
}

this.element = await this.transport.driver.wait(until.elementLocated(locator), this.timeout, null, this.retryInterval);
const byLocator=Locator.create(locator);

this.element = await this.transport.driver.wait(until.elementLocated(byLocator), this.timeout, null, this.retryInterval);
}

static isElementObject(element) {
Expand Down

0 comments on commit d45e64f

Please sign in to comment.