The issue here is I'm trying to scrape a value which is displayed in a current webpage that I'm in and selenium has to capture that value and do certain operations accordingly. The value is dynamic and that webpage can not be reopened through selenium.
Asked
Active
Viewed 68 times
0
-
1Possible duplicate of [Can Selenium interact with an existing browser session?](https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session) – Sureshmani Kalirajan Jul 12 '19 at 14:05
1 Answers
0
The websites can only authenticate the browsers using Cookies which are basically special HTTP Headers so if the browser sends the cookie the websites expects - the website "recognizes" the user and vice versa.
If you want to continue where you left off with Selenium you need to export cookies somehow from the existing session and add them to the browser which is driven by Selenium, there are several API methods which allow cookie manipulation, refer your Selenium client library documentation for specific instructions.

Dmitri T
- 159,985
- 5
- 83
- 133