refactor: driver ScreenShot

This commit is contained in:
lilong.129
2025-02-11 18:13:49 +08:00
parent 792d3ae9bc
commit cf1f553489
8 changed files with 67 additions and 45 deletions

View File

@@ -533,10 +533,10 @@ func (ud *UIA2Driver) Rotation() (rotation types.Rotation, err error) {
return
}
func (ud *UIA2Driver) ScreenShot() (raw *bytes.Buffer, err error) {
func (ud *UIA2Driver) ScreenShot(opts ...option.ActionOption) (raw *bytes.Buffer, err error) {
// https://bytedance.larkoffice.com/docx/C8qEdmSHnoRvMaxZauocMiYpnLh
// ui2截图受内存影响改为adb截图
return ud.ADBDriver.ScreenShot()
return ud.ADBDriver.ScreenShot(opts...)
}
func (ud *UIA2Driver) Source(srcOpt ...option.SourceOption) (source string, err error) {