diff --git a/server/src/workflow-management/utils.ts b/server/src/workflow-management/utils.ts index 4cf1232f..775a0b55 100644 --- a/server/src/workflow-management/utils.ts +++ b/server/src/workflow-management/utils.ts @@ -15,8 +15,8 @@ export const getBestSelectorForAction = (action: Action) => { // less than 25 characters, and element only has text inside const textSelector = selectors?.text?.length != null && - selectors?.text?.length < 25 && - action.hasOnlyText + selectors?.text?.length < 25 && + action.hasOnlyText ? `text=${selectors.text}` : null;