【发布时间】:2016-04-30 03:52:25
【问题描述】:
我想在 python 测试中测试格式是否类似于“03:10 ~ 04:10”,但是我无法正确获取它。 这是我的代码
def test_activity_today_time_format(self):
"""Test time format is HH:MM """
driver = self.driver
# Get page by URL
driver.get(self.base_url + "/userk/inbox/")
# Check time format
self.assertEqual("%H:%M ~ %H:%M", driver.find_element_by_xpath("//td[3]").text)
我觉得这个逻辑有问题
"%H:%M ~ %H:%M"
【问题讨论】: