mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: screenshot with path
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v5.0.0+2503042040
|
v5.0.0+2503051043
|
||||||
|
|||||||
@@ -254,11 +254,11 @@ func (ud *UIA2Driver) Orientation() (orientation types.Orientation, err error) {
|
|||||||
|
|
||||||
func (ud *UIA2Driver) DoubleTap(x, y float64, opts ...option.ActionOption) error {
|
func (ud *UIA2Driver) DoubleTap(x, y float64, opts ...option.ActionOption) error {
|
||||||
var err error
|
var err error
|
||||||
actionOptions := option.NewActionOptions(opts...)
|
|
||||||
x, y, err = convertToAbsolutePoint(ud, x, y)
|
x, y, err = convertToAbsolutePoint(ud, x, y)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
actionOptions := option.NewActionOptions(opts...)
|
||||||
x, y = actionOptions.ApplyOffset(x, y)
|
x, y = actionOptions.ApplyOffset(x, y)
|
||||||
|
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func (dExt *XTDriver) GetScreenResult(opts ...option.ActionOption) (screenResult
|
|||||||
// get screenshot info with retry
|
// get screenshot info with retry
|
||||||
for i := 0; i < 3; i++ {
|
for i := 0; i < 3; i++ {
|
||||||
imagePath = filepath.Join(config.GetConfig().ScreenShotsPath, fileName)
|
imagePath = filepath.Join(config.GetConfig().ScreenShotsPath, fileName)
|
||||||
bufSource, err = dExt.ScreenShot()
|
bufSource, err = dExt.ScreenShot(option.WithScreenShotFileName(imagePath))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
lastErr = err
|
lastErr = err
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user