I want to create a script that will let me login to https://gateway.usps.com/eAdmin/view/signin however all my attempts fail due to three hidden inputs that dynamically change whenever the page is refreshed or opened in a new window or tab. Even if I leave selenium webdriver to one side, and do a GET request and get all the cookies, headers and the hidden input values, by the time I call the POST request, the hidden values are updated so I am not able to login (I use requests and BeautifulSoup in Python). So, since I cannot login from a script, I have this idea of opening a browser, login there manually, and after that use either selenium webdriver or requests to navigate to the page where I want to download some csv and pdf files. Is it possible to do this?
Asked
Active
Viewed 6,004 times
1
-
I think this might be a duplicate of https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session Which has this helpful answer: https://stackoverflow.com/a/34394556/10588784 – Nathaniel C Apr 13 '19 at 23:44
-
1My issue is that I want to reach a page inside my USPS account without having to login because dynamically-changing hidden variables in the login form prevent me from doing so. I can login manually to USPS and navigate to the page I want, copy the URL as per the solution you referred me to, then do a GET call, but when I run the RemoteWebdriver guess what page opens? The login one :( – user3400351 Apr 14 '19 at 03:34