-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Unable to switch frames when using chromium #2292
Comments
It looks like there is no frame with the given name. I am not sure assigning frame to a page is what you want here - these are objects of different types. You will be calling Page methods on this object and it won't have them because it would be a frame, not a page. Note that you only need to Also note that unlike with Selenium, you don't need to "switch" frames, you can work with them simultaneously and it is recommended to pass the frame object into functions that operate on a given frame. |
The fact that it works on WebKit and Firefox could be due to a race condition. You might need to wait for the frame to be attached/loaded in the page before you access it. |
@pavelfeldman - we pass frame name to this method. Due to the complexity of our application - we have to assign frame to a page which has majority of the testable components. I am seeing issue with chromium only on the latest playwright version (1.0.2) |
Our tests for this feature pass on all the platforms, so I wonder if there is something specific in your environment. Is this frame served off the same origin as the page? We might be facing an out-of-process iframe in Chromium if it isn't. Happy to resolve this for you, but need help reproducing. |
@pavelfeldman - we serve part of the landing frame that is not recognized from foo.company.com and load/log into bar-test.company.com.. so it isn't the same origin because of different subdomains |
Got it. Since those are same domain, they should be considered same-site by Chromium, so no out-of-process-iframe business. Then it must be the race condition - there is no frame with that name at the moment you are asking. You get |
Anything we can do to repro? Did you figure out whether it was a race on your side? |
@pavelfeldman - doesn't seem to be a race condition. It is happening only on chromium (and not on firefox and webkit). Due to security of the application, it is difficult to post more details here. |
@saurabhxkapoor well playwright team needs reproduction and tests are passing so there is nothing they can do on their end. And before assigning can u do console log etc?
|
Unfortunately, we haven't seen it happening anywhere. And since the name of the bug includes "switch frames", which does not really apply to Playwright, I'll tentatively close this as a part of my bulk triage. Could you please open a new bug suggesting the certain frame is missing if you find a repro scenario you can share? |
Context:
Code Snippet
This results in undefined page
This is working with playwright version 0.9.21
The text was updated successfully, but these errors were encountered: