Comment Comment by mherrmann OP struggles with XPaths in complex DOMs. This is a solved problem. Use Helium [1] to write test code that acts on what the user sees: start_chrome('github.com/login') write('user', into='Username') write('pw', into='Password') click('Sign in') I am the author of Helium. It's a wrapper around Selenium. It's fully open source. Under the hood, it uses Selenium 3, which is old. But boy does it work beautifully.1: https://github.com/mherrmann/selenium-python-helium parent mherrmann 4 years ago
1: https://github.com/mherrmann/selenium-python-helium