[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