Get URL of the loaded webpage
(browser)
| 1859 | |
| 1860 | |
| 1861 | def get_current_url(browser): |
| 1862 | """Get URL of the loaded webpage""" |
| 1863 | try: |
| 1864 | current_url = browser.execute_script("return window.location.href") |
| 1865 | |
| 1866 | except WebDriverException: |
| 1867 | try: |
| 1868 | current_url = browser.current_url |
| 1869 | |
| 1870 | except WebDriverException: |
| 1871 | current_url = None |
| 1872 | |
| 1873 | return current_url |
| 1874 | |
| 1875 | |
| 1876 | def get_username_from_id(browser, user_id, logger): |
no test coverage detected