Python Selenium Function Key Lock