Use webdriver not webbrowser. Just changing your code to use that instead fixes your problem. The full code is below. from selenium import ...
Lee mas