Home > Mobile >  Appnium use swip sliding screen, can slide for the first time, will not take effect for the second t
Appnium use swip sliding screen, can slide for the first time, will not take effect for the second t

Time:04-28

Dic_path="* * * *"
The channel="* * * *"
Channel_count=0
Pic_count=0
Swip_end=False
File_name1=OS. Path. Join (dic_path, channel + STR (channel_count) + "_" + STR (pic_count) + ". PNG ")
Take_screenShot (driver, file_name1 pic_count)
Pic_count=pic_count + 1
While not swip_end:
Swipe_up (driver, x, y)
Time. Sleep (2)
File_name2=OS. Path. Join (dic_path, channel + STR (channel_count) + "_" + STR (pic_count) + ". PNG ")
Take_screenShot (driver, file_name2 pic_count)
Pic_count=pic_count + 1
Similary=cmppic (file_name1 file_name2)
If similary> 0.97:
Swip_end=True
OS. Remove (file_name2)
File_name1=file_name2
  • Related