loop and refresh the webpage until href is active python selenium code example Example: browser refresh selenium python browser.refresh()