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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

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

c# - Search and Add Comment with OpenXML for Word -