mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
fix: remove unnecessary IgnoreNotFoundError and MaxRetryTimes from coordinate-based tap tools
- Removed IgnoreNotFoundError and MaxRetryTimes parameters from TapRequest, TapAbsXYRequest, and DoubleTapXYRequest structures - Updated corresponding tool implementations to remove references to these non-existent fields - These parameters are not applicable to coordinate-based operations as they don't involve element searching - Only OCR/CV-based operations need these error handling parameters This ensures that only relevant tools have the ignore_NotFoundError functionality, making the API more consistent and avoiding confusion.
This commit is contained in:
@@ -316,18 +316,10 @@ func (t *ToolTapXY) Implement() server.ToolHandlerFunc {
|
||||
// Build action options from request structure
|
||||
var opts []option.ActionOption
|
||||
|
||||
// Add boolean options
|
||||
if tapReq.IgnoreNotFoundError {
|
||||
opts = append(opts, option.WithIgnoreNotFoundError(true))
|
||||
}
|
||||
|
||||
// Add numeric options
|
||||
if tapReq.Duration > 0 {
|
||||
opts = append(opts, option.WithDuration(tapReq.Duration))
|
||||
}
|
||||
if tapReq.MaxRetryTimes > 0 {
|
||||
opts = append(opts, option.WithMaxRetryTimes(tapReq.MaxRetryTimes))
|
||||
}
|
||||
|
||||
// Add default options
|
||||
opts = append(opts, option.WithPreMarkOperation(true))
|
||||
@@ -394,18 +386,10 @@ func (t *ToolTapAbsXY) Implement() server.ToolHandlerFunc {
|
||||
// Build action options from request structure
|
||||
var opts []option.ActionOption
|
||||
|
||||
// Add boolean options
|
||||
if tapAbsReq.IgnoreNotFoundError {
|
||||
opts = append(opts, option.WithIgnoreNotFoundError(true))
|
||||
}
|
||||
|
||||
// Add numeric options
|
||||
if tapAbsReq.Duration > 0 {
|
||||
opts = append(opts, option.WithDuration(tapAbsReq.Duration))
|
||||
}
|
||||
if tapAbsReq.MaxRetryTimes > 0 {
|
||||
opts = append(opts, option.WithMaxRetryTimes(tapAbsReq.MaxRetryTimes))
|
||||
}
|
||||
|
||||
// Tap absolute XY action logic
|
||||
log.Info().Float64("x", tapAbsReq.X).Float64("y", tapAbsReq.Y).Msg("tapping at absolute coordinates")
|
||||
|
||||
Reference in New Issue
Block a user