I'm using Selenium + Python 2.7 stack.
I want to login to this forum and crawl the post data for academic research purposes. I am using the following code to fill the login form :
username = browser.find_element_by_xpath("//input[@id='navbar_username']")
username.clear()
username.send_keys("####")
password = browser.find_element_by_xpath("//input[@id='navbar_password_hint']")
password.clear()
password.send_keys("####")
loginbutton = browser.find_element_by_xpath("//input[@class='loginbutton']")
loginbutton.click()
But I'm not able to login when the crawler runs. It is taking me to the wrong username/password page. I tried to login manually using the same information, and was able to login without any errors. While running the crawler, correct values are filled in the username and password fields. I can't understand what might be causing the problem. Any help is deeply appreciated.
Seleniuminteractively, and then export the code as Python. When looking at the resulting (working) code, you'd probably discover why your original code failed.