From 52f6aea6c638693e8c30c1770c2dc6a243445dfe Mon Sep 17 00:00:00 2001 From: Chris Vacalares Date: Tue, 7 Jun 2022 16:43:28 -0700 Subject: [PATCH] Update the row's Edit selector. --- src/step_definitions/steps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/step_definitions/steps.js b/src/step_definitions/steps.js index 44f8a455d..cfac52dd4 100644 --- a/src/step_definitions/steps.js +++ b/src/step_definitions/steps.js @@ -201,7 +201,7 @@ Then(/^user can not see "([^"]*)" link$/, async (args1) => { Then(/^user can see each row has an Edit link$/, async () => { const selector = { - selector: "//a/span[contains(text(),'Edit')]", + selector: "//td/a[normalize-space()='Edit']", locateStrategy: "xpath", }; @@ -520,7 +520,7 @@ When(/^user edits a user$/, async (table) => { //go to the row with matching name const selector = { - selector: `//*[@id='app']//table//tbody//td[contains(text(),'${user.userName}')]/..//a/span[contains(text(),'Edit')]`, + selector: `//*[@id='app']//table//tbody//td[contains(text(),'${user.userName}')]/..//a[normalize-space()='Edit']`, locateStrategy: "xpath", }; await page.moveToElement(selector, 1, 1);