fix(codegen): fallback to iframe[name/src] when failed to generate selector
This could happen, for example, when iframe element is inside a closed shadow root. Instead of using `error.toString()` as a selector (!), fallback to `iframe[name]` or `iframe[src]`.
This commit is contained in:
parent
f713d3adaf
commit
ae3ffc2c3d
|
|
@ -300,7 +300,6 @@ async function generateFrameSelectorInParent(parent: Frame, frame: Frame): Promi
|
|||
}, frameElement);
|
||||
return selector;
|
||||
} catch (e) {
|
||||
return e.toString();
|
||||
}
|
||||
}, monotonicTime() + 2000);
|
||||
if (!result.timedOut && result.result)
|
||||
|
|
|
|||
Loading…
Reference in a new issue