I'm trying to find the element by xpath and constantly getting syntax error
It puts ^
mark before the colon in my xpath.
I'm generating the xpath in Chrome dev tools. Finding the element in html, right clicking it and selecting Copy xpath.
C:\>python ebcm_login.py
File "ebcm_login.py", line 47
elem = driver.find_element_by_xpath("//*[@id="j_idt51:j_idt55_body"]/table/tbody/tr/td[2]/table/tbody/tr[6]/td[1]/input")
^
SyntaxError: invalid syntax
C:\>python ebcm_login.py
File "ebcm_login.py", line 48
elem = driver.find_element_by_xpath("//*[@id="menuForm:j_idt57"]/table/tbody/tr/td[2]")
^
SyntaxError: invalid syntax
C:\>python
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>