企业网站怎么查,app源码购买,网站空间3个g多少钱,深圳室内设计公司排行实际上用到的几种写断言的方式#xff1a;
1.验证UI界面#xff08;断言图片是否存在#xff0c;UI页面不稳定情况下#xff0c;图片识别效率不高#xff09; assert_exists assert_not_exists 2.验证数值#xff08;断言传入的两个值(数字或者string)是否相等#xff…实际上用到的几种写断言的方式
1.验证UI界面断言图片是否存在UI页面不稳定情况下图片识别效率不高 assert_exists assert_not_exists 2.验证数值断言传入的两个值(数字或者string)是否相等 assert_equal
assert_equal(poco(button).get_text(), 0, 按钮的值与预期一致)assert_not_equal name1self.poco(text名称).parent().parent().child()[11].child()[0].child()[0]
self.poco(text涨幅).click()
time.sleep(3)
# 获取排序后的第一个基金的name值
name2self.poco(text名称).parent().parent().child()[11].child()[0].child()[0]
assert_not_equal(name1.get_text(),name2.get_text(),排序后非同一支基金)3.断言文字是否存在
assert_true(self.poco(text涨幅榜).exists())