selenium pre login code example

Example: selenium pre login

CookieStore cookieStore = new BasicCookieStore();
 
// Create local HTTP context
HttpClientContext localContext = HttpClientContext.create();
// Bind custom cookie store to the local context
localContext.setCookieStore(cookieStore);
 
HttpGet httpget = new HttpGet("https://www.hepsiburada.com/ayagina-gelsin/giris");
System.out.println("Executing request " + httpget.getRequestLine());
 
httpclient.start();
 
// Pass local context as a parameter
Future future = httpclient.execute(httpget, localContext, null);

Tags:

Misc Example