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

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -