Closed vipinphogat91 closed 8 months ago
chromium.connect()
returns a Browser
, not BrowserContext
. Therefore, it does not have a page()
method so you cannot call context.pages()
on it.
If you believe there is a bug in Playwright, please file a new issue using by filling in the "Bug Report" template, and provide a self-contained repro.
How can a user switch between pages when using chromium.connect()?
Version
1.41.2
Steps to reproduce
I am currently running my test case on LambdaTest platform with below configuration: Browser = Chrome Version = 121 OS = Windows 11
The test case which I am executing involves switching from parent page to iFrame and then back to parent page. In order to launch browser on lambdatest I am using below command:
During the execution I am able to switch to iFrame but I am not able to switch back to parent browser page.
Below is the command i am using:
Please note that I am able to successfully execute the code on my local machine the only difference is that on my local instead of chromium.connect() I am launching a persistent context.
Expected behavior
I should be able to switch back to the parent page or browser from an iFrame
Actual behavior
Currently I am getting below error:
TypeError: context.pages is not a function
Additional context
No response
Environment