Hello sir I have cookies in .txt format on how to load these cookies in selenium without login to load the session.
@AJAUTOMATION2 ай бұрын
Here you need to store the cookies in txt file in correct format like nameofcookie=value;domain;path;expiry read this file using java code. Store nameofcookie , value domain etc in String format then build the cookie like below using above data from txt file Cookie cookie = new Cookie.Builder(nameofcookie, value).domain(domain).path(path).expiresOn(expiry).build(); now you can use addCookie method to add above cookie object. driver.manage().addCookie(cookie);
@KshitijSalgar27 күн бұрын
Now this URL has given security so can’t login in second method using cookie
@sathyanarayanansatzsathya18 күн бұрын
Instead of navigate to use driver.get as it will for page to load