I'm writing a script in python using the selenium chrome webdriver, and I want to click on a link. The link itself is:
a href="javascript:contentReplace('/cgi-bin/ssol/9PGaiwzaxu43ZaLXZ8mAix/?p%.5Fr%.5Fid=a5UAMSbnZrZMIowCvr5gzh&p%.5Ft%.5Fid=1&tran%.5B1%.5D%.5Fentry=student&tran%.5B1%.5D%.5Ftran%.5Fname=sreg')">Registration/a>
(I took off the opening < of the link elements so as to be able to display the code, not the text, in the browser)
I couldn't locate it using find_element_by_link_text--it kept throwing an error--so I tried using the xpath. I used firebug to get the xpath, and it is: "/html/body/table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td/ul/li/ul/li[10]/a"
But when I do link = driver.find_element_by_xpath("//html/body/table/tbody/tr[2]/td[2]/ta\ ble/tbody/tr[2]/td/ul/li/ul/li[10]/a")
I get an error of "urlopen error [Errno 61] Connection refused"
Not sure what's wrong, since the xpath works in firebug.