From 6acfeb74f3cc43db2c6dc61673960b12e4bd8801 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Mon, 20 Dec 2021 11:36:29 -0500 Subject: [PATCH] Fix WebElementWrapper.findByTestSubject passing css selector to the created 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 --- .../services/lib/web_element_wrapper/web_element_wrapper.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts b/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts index c083ca26a25d9..b1cca4cb3ea83 100644 --- a/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts +++ b/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts @@ -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))) ); }); }