mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
feat: device新增截图方法
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package uixt
|
package uixt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||||
"github.com/httprunner/httprunner/v5/pkg/uixt/types"
|
"github.com/httprunner/httprunner/v5/pkg/uixt/types"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -73,3 +74,7 @@ func (dev *BrowserDevice) NewDriver() (driver IDriver, err error) {
|
|||||||
}
|
}
|
||||||
return driver, nil
|
return driver, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (dev *BrowserDevice) ScreenShot() (*bytes.Buffer, error) {
|
||||||
|
return nil, errors.New("not support")
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package uixt
|
package uixt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||||
"github.com/httprunner/httprunner/v5/pkg/uixt/types"
|
"github.com/httprunner/httprunner/v5/pkg/uixt/types"
|
||||||
)
|
)
|
||||||
@@ -17,7 +18,7 @@ type IDevice interface {
|
|||||||
Uninstall(packageName string) error
|
Uninstall(packageName string) error
|
||||||
|
|
||||||
GetPackageInfo(packageName string) (types.AppInfo, error)
|
GetPackageInfo(packageName string) (types.AppInfo, error)
|
||||||
|
ScreenShot() (*bytes.Buffer, error)
|
||||||
// TODO: remove?
|
// TODO: remove?
|
||||||
LogEnabled() bool
|
LogEnabled() bool
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package uixt
|
package uixt
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"code.byted.org/iesqa/ghdc"
|
"code.byted.org/iesqa/ghdc"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
@@ -106,3 +107,7 @@ func (dev *HarmonyDevice) NewDriver() (IDriver, error) {
|
|||||||
}
|
}
|
||||||
return driver, nil
|
return driver, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (dev *HarmonyDevice) ScreenShot() (*bytes.Buffer, error) {
|
||||||
|
return nil, errors.New("not implemented")
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user