liumiaomiao 1 年之前
父節點
當前提交
fddc025db3

+ 4 - 2
cases/未登录功能/链接验证/app_search_link.py

@@ -6,7 +6,9 @@ class T0001:
     #测试步骤
     def teststeps(self):
         STEP(1, "访问页面并截取特定区域快照")
-        url = 'https://app-a1.jianyu360.cn/jy_mobile/search/middle/bidding'
+        # url = 'https://app-a1.jianyu360.cn/jy_mobile/search/middle/bidding'
+        url = 'https://wx.jianyu360.cn/jy_mobile/search/result/bidding'
+
         #样本快照,每一个链接,快照的名字不一样,要修改
         expected_screenshot = 'images/expected_app_search_screenshot.png'
         current_screenshot = 'images/current_app_search_screenshot.png'
@@ -18,6 +20,6 @@ class T0001:
             'width': 1280,  # 根据你的截图实际宽度设置
             'height': 600  # 根据你的截图实际高度设置
         }
-        result=apilink.obtain_original_snapshot(url,expected_screenshot,current_screenshot,clip)
+        result=apilink.contrast_snapshot(url,expected_screenshot,current_screenshot,clip)
 
         CHECK_POINT("检查app标讯搜索页面是否正常打开", result)

二進制
images/current_app_search_screenshot.png


二進制
images/expected_app_search_screenshot.png


+ 1 - 1
lib/linkapi.py

@@ -31,7 +31,7 @@ class APILink():
             return False
 
 #对比样本快照与当前快照
-    def obtain_original_snapshot(self,url,expected_screenshot,current_screenshot,clip):
+    def contrast_snapshot(self,url,expected_screenshot,current_screenshot,clip):
         # 如果不存在样本照片,生成样本照片
         if not os.path.exists(expected_screenshot):
             self.save_screenshot(url, expected_screenshot, clip)