[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
posted @ 2014-08-13 16:56  yuexizhuo  阅读(2853)  评论(0编辑  收藏  举报