mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
fix: close edge popup
This commit is contained in:
@@ -1 +1 @@
|
|||||||
v4.3.6.202401041140
|
v4.3.8.202401201310
|
||||||
@@ -196,6 +196,19 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if crawler.failedCount > 1 && !isFeed {
|
||||||
|
// enter live room
|
||||||
|
entryPoint := PointF{
|
||||||
|
X: float64(dExt.windowSize.Width / 2),
|
||||||
|
Y: float64(dExt.windowSize.Height / 2),
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Info().Msg("tap screen center to close edge popup")
|
||||||
|
if err := crawler.driverExt.TapAbsXY(entryPoint.X, entryPoint.Y,
|
||||||
|
WithOffsetRandomRange(-20, 20)); err != nil {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// retry
|
// retry
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -209,8 +222,8 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
|||||||
log.Info().Interface("video", currentVideo).
|
log.Info().Interface("video", currentVideo).
|
||||||
Msg("live count achieved, skip entering live room")
|
Msg("live count achieved, skip entering live room")
|
||||||
skipEnterLive = true
|
skipEnterLive = true
|
||||||
} else if rand.Float64() <= 0.70 {
|
} else if rand.Float64() <= 0.50 {
|
||||||
// 70% chance skip entering live room
|
// 50% chance skip entering live room
|
||||||
log.Info().Msg("skip entering preview live by 50% chance")
|
log.Info().Msg("skip entering preview live by 50% chance")
|
||||||
skipEnterLive = true
|
skipEnterLive = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user