fix: unittest

This commit is contained in:
xucong.053
2023-04-19 19:29:36 +08:00
committed by xucong.053
parent f0cafa9a9b
commit 59e82cef72
4 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ func (i *ImageTemplate) read() (imageBuffer *bytes.Buffer, err error) {
// extendCV 获得扩展后的 Driver // extendCV 获得扩展后的 Driver
// 并指定匹配阀值, // 并指定匹配阀值,
// 获取当前设备的 Scale // 获取当前设备的 Scale
func extendCV(driver WebDriver, options ...CVOption) (dExt *DriverExt, err error) { func (dExt *DriverExt) extendCV(options ...CVOption) (err error) {
for _, option := range options { for _, option := range options {
option(&dExt.CVArgs) option(&dExt.CVArgs)
} }
+1 -1
View File
@@ -131,7 +131,7 @@ func (s *veDEMCPService) getCPResult(sourceImage []byte) ([]CPResult, error) {
} }
func (s *veDEMCPService) FindPopupCloseButton(byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) { func (s *veDEMCPService) FindPopupCloseButton(byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) {
data := NewData(map[string]interface{}{}, options...) data := NewDataOptions(options...)
cpResults, err := s.getCPResult(byteSource) cpResults, err := s.getCPResult(byteSource)
if err != nil { if err != nil {
+1 -1
View File
@@ -130,7 +130,7 @@ func (s *veDEMIMService) getIMResult(searchImage []byte, sourceImage []byte) ([]
} }
func (s *veDEMIMService) FindImage(byteSearch []byte, byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) { func (s *veDEMIMService) FindImage(byteSearch []byte, byteSource []byte, options ...DataOption) (rect image.Rectangle, err error) {
data := NewData(map[string]interface{}{}, options...) data := NewDataOptions(options...)
cvResults, err := s.getIMResult(byteSearch, byteSource) cvResults, err := s.getIMResult(byteSearch, byteSource)
if err != nil { if err != nil {
-2
View File
@@ -16,13 +16,11 @@ var (
WithUDID = uixt.WithUDID WithUDID = uixt.WithUDID
WithWDAPort = uixt.WithWDAPort WithWDAPort = uixt.WithWDAPort
WithWDAMjpegPort = uixt.WithWDAMjpegPort WithWDAMjpegPort = uixt.WithWDAMjpegPort
WithLogOn = uixt.WithLogOn
WithResetHomeOnStartup = uixt.WithResetHomeOnStartup WithResetHomeOnStartup = uixt.WithResetHomeOnStartup
WithSnapshotMaxDepth = uixt.WithSnapshotMaxDepth WithSnapshotMaxDepth = uixt.WithSnapshotMaxDepth
WithAcceptAlertButtonSelector = uixt.WithAcceptAlertButtonSelector WithAcceptAlertButtonSelector = uixt.WithAcceptAlertButtonSelector
WithDismissAlertButtonSelector = uixt.WithDismissAlertButtonSelector WithDismissAlertButtonSelector = uixt.WithDismissAlertButtonSelector
WithClosePopup = uixt.WithClosePopup WithClosePopup = uixt.WithClosePopup
WithPerfOptions = uixt.WithPerfOptions
) )
// android setting options // android setting options