I am trying to automate the login to a "betting" website called Smarkets. I am using Selenium (with Python) to do this. I can get my code to navigate to the website "https://smarkets.com", click the little "Log in" button on the right hand top corner, and then to automatically enter my email and password in the pop up window that comes up. The next stage is for my code to automatically click the big "Log In" button on that pop up window, but I can't seem to be able to locate it. Inspecting the HTML elements for this button shows the following:
<button class = "micro-button -accented " type = "submit">Log In</button>==$0
and nothing else - no ID, div class name, etc. From the code line above, I found the Xpath to be:
//*[@id="smarkets"]/div[3]/div/div/div[1]/form/button
So in my code, I tried to find this button via copying the Xpath above:
signInButton = browser.find_element_by_xpath("//*[@id="smarkets"]/div[3]/div/div/div[1]/form/button")
However when I run this code, I get an syntax error "invalid syntax". Please help - I spent hours trying to understand where I am going wrong...