I am running a playwright script that opens a page (we'll call this page A) and then clicks a button that opens in a new tab. (page B)
page.navigate("https://<somethirdparty>.com"); //Page A
page.waitForLoadState(LoadState.NETWORKIDLE);
ElementHandle elementHandle = page.querySelector("#submit button[class='x']");
elementHandle.click(); //Opens in a new tab (Page B)
Now elementHandle.click() opens in a new tab but I have no access to the page object anymore. Any idea on how to access the page and wait for the page to be in a NETWORKIDLE state before I resume with my test?