美文网首页
[Airtest]8.Screen Resolution

[Airtest]8.Screen Resolution

作者: elf_fff | 来源:发表于2023-03-29 14:01 被阅读0次

Airtest API

use device() to get the resolution:

from airtest.core.api import *

w,h = device().get_current_resolution()

Windows method

import win32api, win32con

x_resolution = win32api.GetSystemMetrics(win32con.SM_CXSCREEN)
y_resolution = win32api.GetSystemMetrics(win32con.SM_CYSCREEN)

相关文章

网友评论

      本文标题:[Airtest]8.Screen Resolution

      本文链接:https://www.haomeiwen.com/subject/daqxddtx.html