As in htmlunit
use cookies on the same site. I log in to the site, display the result as text. It is written that "the input is made successfully." I go to the main page of this site and it says there that I have not logged in (Log in, register, it is written).
I create a WebClient
like this:
final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_45); webClient.getOptions().setJavaScriptEnabled(true); webClient.getOptions().setRedirectEnabled(true); webClient.getOptions().setThrowExceptionOnScriptError(false); webClient.getOptions().setCssEnabled(false); webClient.getOptions().setUseInsecureSSL(true); webClient.getOptions().setThrowExceptionOnFailingStatusCode(false); webClient.getCache().setMaxSize(0); CookieManager cm = new CookieManager(); webClient.setCookieManager(cm);
Writes:
WARNING: Cookie rejected [phpbb3_la4i4_u="6020", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com" авг 11, 2016 2:26:52 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected [phpbb3_la4i4_k="", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com" авг 11, 2016 2:26:52 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected [phpbb3_la4i4_sid="40411e762a59c3ce238e765b05a5af58", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com" авг 11, 2016 2:26:53 AM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
And a lot of such inscriptions