feat: prioritize returning iframe selector if exists

This commit is contained in:
RohitR311
2025-01-04 09:14:05 +05:30
parent 9eb4ec398a
commit 2943681c9b

View File

@@ -12,6 +12,11 @@ export const getBestSelectorForAction = (action: Action) => {
case ActionType.Hover:
case ActionType.DragAndDrop: {
const selectors = action.selectors;
if (selectors?.iframeSelector?.full) {
return selectors.iframeSelector.full;
}
// less than 25 characters, and element only has text inside
const textSelector =
selectors?.text?.length != null &&