I am trying to invoke the BrowserSession to open a webpage. I usually use the following code:
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage(link);
browserSession.showBrowser();
But I want now to use post method while opening the website in the same method. How can I post data into the BrowserSession?
I found the following method:
displayPage(String url, String referrer, HttpHeaders requestHeaders, PostData postData)
I’ve been trying it and nothing as a result … Anyone who can help please?
Thanks
Here is how you could use
BrowserSession.displayPage(String url, String referrer, HttpHeaders requestHeaders, PostData postData)method: