Python Selenium return text, unicode object is not callable -


i'm trying use selenium automate web browsing. i'm trying access specific element class name , return text within (the element im selecting on page definetly has text in it) , when try return in function get

typeerror: 'unicode' object not callable 

my code function follows:

driver = webdriver.chrome("my chromedriver installation path") driver.get("website url")  def gettext():     return driver.find_element_by_class_name("class text").text()  print gettext() 

.text not method, attribute:

driver.find_element_by_class_name("class text").text 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -