feat: prioritize returning iframe selector if exists
This commit is contained in:
@@ -12,6 +12,11 @@ export const getBestSelectorForAction = (action: Action) => {
|
|||||||
case ActionType.Hover:
|
case ActionType.Hover:
|
||||||
case ActionType.DragAndDrop: {
|
case ActionType.DragAndDrop: {
|
||||||
const selectors = action.selectors;
|
const selectors = action.selectors;
|
||||||
|
|
||||||
|
if (selectors?.iframeSelector?.full) {
|
||||||
|
return selectors.iframeSelector.full;
|
||||||
|
}
|
||||||
|
|
||||||
// less than 25 characters, and element only has text inside
|
// less than 25 characters, and element only has text inside
|
||||||
const textSelector =
|
const textSelector =
|
||||||
selectors?.text?.length != null &&
|
selectors?.text?.length != null &&
|
||||||
|
|||||||
Reference in New Issue
Block a user