我正在用Selenium创建一个Python脚本。我想运行一个特定的测试,在页面加载时检查文本框的默认文本。下面是我的代码.......AssertionError - Selenium/Python
try:
self.assertEqual("Search by template name or category..", sel.get_text("//table[@id='pluginToolbarButton_forms']/tbody/tr[2]/td[2]/em"))
logging.info(' PASS: text box text is correct')
except Exception:
logging.exception(' FAIL: text box text is incorrect')
这里是我的错误......
self.assertEqual("Search by template name or category..", sel.get_text("//table[@id='pluginToolbarButton_forms']/tbody/tr[2]/td[2]/em"))
File "C:\Python27\lib\unittest\case.py", line 509, in assertEqual
assertion_func(first, second, msg=msg)
File "C:\Python27\lib\unittest\case.py", line 502, in _baseAssertEqual
raise self.failureException(msg)
AssertionError: 'Search by template name or category..' != u'Submitter Requests'
我使用了错误的功能?