[selenium][python]錯誤'unicode' object is not callable的原因


今天在寫腳本的時候,出現了 'unicode' object is not callable 的錯誤,上網查找后發現原來錯把webdriver.title寫成了webdriver.title(),其源碼如下

1     def title(self):
2         """Returns the title of the current page.
3 
4         :Usage:
5             driver.title
6         """
7         resp = self.execute(Command.GET_TITLE)
8         return resp['value'] if resp['value'] is not None else ""
返回當前頁面的標題,使用方法是:driver.title


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM