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);