美文网首页我爱编程
python3 selenium如何比较两个字符串

python3 selenium如何比较两个字符串

作者: gz_tester | 来源:发表于2018-01-09 18:01 被阅读0次

如何比较两个字符串:

title = self.driver.find_element_by_id('title')
        now_title = self.driver.title
        print('当前页面的title是{0}'.format(now_title))
        if self.driver.title == (str(title) + str('参加的课程 - 课工场')):
            print('测试通过')
        else:
            print('测试失败')

相关文章

网友评论

    本文标题:python3 selenium如何比较两个字符串

    本文链接:https://www.haomeiwen.com/subject/lqegnxtx.html