Skip to content

Commit

Permalink
Fix WebElementWrapper.findByTestSubject passing css selector to the c…
Browse files Browse the repository at this point in the history
…reated wrapper (#121493) (#121651)

* Fix WebElementWrapper.findByTestSubject incorrectly passing a css selector to created wrapper

* lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@elastic.co>
  • Loading branch information
kibanamachine and pgayvallet authored Dec 20, 2021
1 parent 3a8cd2e commit 6acfeb7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ export class WebElementWrapper {
public async findByTestSubject(selector: string) {
return await this.retryCall(async function find(wrapper) {
return wrapper._wrap(
await wrapper._webElement.findElement(wrapper.By.css(testSubjSelector(selector))),
wrapper.By.css(selector)
await wrapper._webElement.findElement(wrapper.By.css(testSubjSelector(selector)))
);
});
}
Expand Down

0 comments on commit 6acfeb7

Please sign in to comment.