I looking at playwright and I want to return a response I have looked at the examples and there is the following snippit
Response resp = page.navigate(getPageRequest.getUrl(), new Page.NavigateOptions().setTimeout(60000));
But what I want to do is loggin on the first page which is a loggon page which will return the main page , and that page, I want to return the response, so I have the following code
// This page is the loggin page
page.navigate(logginURL, new Page.NavigateOptions().setTimeout(60000));
String title = page.title();
System.out.println("title : "+title);
page.fill("input[name='username']", "MyName");
page.fill("input[name='password']", "MyPassword");
page.click("text=Login");
Thread.sleep(300);
// This is the main page after a successful login
title = page.title();
Is there a way to navigate to a page login and return the successful have logged in page