mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +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
|
||||
}
|
||||
|
||||
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
|
||||
continue
|
||||
}
|
||||
@@ -209,8 +222,8 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
|
||||
log.Info().Interface("video", currentVideo).
|
||||
Msg("live count achieved, skip entering live room")
|
||||
skipEnterLive = true
|
||||
} else if rand.Float64() <= 0.70 {
|
||||
// 70% chance skip entering live room
|
||||
} else if rand.Float64() <= 0.50 {
|
||||
// 50% chance skip entering live room
|
||||
log.Info().Msg("skip entering preview live by 50% chance")
|
||||
skipEnterLive = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user