I'm trying to create a bot on Python using Selenium and BeautifulSoup, but currently facing a problem I didn't find a solution to so far:
I make an automated way to log in and import a specific item from user data. I navigate using Selenium find_element and Click() but at the last step a new tab is open and I need its URL. the problem is that the URL is changing after less than a second and my target is to catch that slippery first URL. using Selenium switch_to_window is too slow, so I get just the second URL.
here's a link for a video to illustrate the problem (I recommend watching on 0.2X speed): https://files.fm/f/sx97x2r84
In the video the new tab's URL is changing fast and I need to catch it