Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97811

Getting the url of webpage on Timout (Python Slenium)

$
0
0

My question is how to get the URL of a webpage in selenium while a page timeout. The website is not loading completely but I want to get the URL before the website has finished to load (which is never going to happen). Does someone have a Idea how to get the URL?

        chrome_options.add_argument("--headless")
        profile = {"download.default_directory": "NUL", "download.prompt_for_download": False, }
        chrome_options.add_experimental_option("prefs", profile)
        driver = webdriver.Chrome(options=chrome_options)
        driver.header_overrides = {
            'Referer': 'referer_string',
        }
        driver.set_window_position(0, 0)
        driver.set_window_size(1920, 1080)
        driver.set_page_load_timeout(5)
        driver.get(NEVERLOADINGLINK)
        a = driver.current_url
        print(a)


Viewing all articles
Browse latest Browse all 97811

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>