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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -