Airtest-selenium移植pycharm部分設置(四)

Airtest-selenium移植pycharm部分設置(四)

因爲移植airtest-selenium到pycharm編寫比較方便,同時也可以使用以前的框架進行兼容。

修改Airtest輸出日誌等級

使用圖片匹配函數時:

self.driver.airtest_touch(Template(r"./template_image/tpl1574306781001.png", record_pos=(3.885, 2.81), resolution=(100, 100)))

當使用pycharm時,會在終端輸出圖片匹配的調試日誌如:

[05:39:03][DEBUG]<airtest.core.api> try match with SURFMatching
[05:39:05][DEBUG]<airtest.aircv.keypoint_base> [SURF] threshold=0.7, result={'result': (438, 312), 'rectangle': [(211, 238), (211, 386), (665, 386), (665, 238)], 'confidence': 0.969273179769516}
[05:39:05][DEBUG]<airtest.aircv.keypoint_base> find_best_result() run time is 2.23 s.
[05:39:05][DEBUG]<airtest.core.api> match result: {'result': (438, 312), 'rectangle': [(211, 238), (211, 386), (665, 386), (665, 238)], 'confidence': 0.969273179769516}
[05:39:16][DEBUG]<airtest.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章