Commit bc7102d
fix(Playwright): switchTo resolves nested iframes relative to current frame (#5717)
switchTo() always built the frame locator from the page, so switching into
an iframe nested inside the current frame silently resolved to nothing:
the step passed, but every following action timed out and no element on
any level was reachable.
The existence check ahead of it runs against the current frame, which is
why the bad switch was never reported. Chain the frame locator from the
current frame when there is one, as 3.x did.
frameLocator() is synchronous, so the Promise.race wrapper never raced
anything and left a dangling 5s timer behind on every switchTo call.
Fixes #5688
Claude-Session: https://claude.ai/code/session_01M93h8jjpyUt1A7Px3kwpxC
Co-authored-by: DavertMik <davert@testomat.io>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent fcf3440 commit bc7102d
2 files changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3667 | 3667 | | |
3668 | 3668 | | |
3669 | 3669 | | |
3670 | | - | |
3671 | | - | |
| 3670 | + | |
3672 | 3671 | | |
3673 | 3672 | | |
3674 | 3673 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1963 | 1963 | | |
1964 | 1964 | | |
1965 | 1965 | | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
1966 | 1998 | | |
1967 | 1999 | | |
1968 | 2000 | | |
| |||
0 commit comments