mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: ignore testcase popup
This commit is contained in:
@@ -46,6 +46,7 @@ type TConfig struct {
|
|||||||
PluginSetting *PluginConfig `json:"plugin,omitempty" yaml:"plugin,omitempty"` // plugin config
|
PluginSetting *PluginConfig `json:"plugin,omitempty" yaml:"plugin,omitempty"` // plugin config
|
||||||
MCPConfigPath string `json:"mcp_config_path,omitempty" yaml:"mcp_config_path,omitempty"`
|
MCPConfigPath string `json:"mcp_config_path,omitempty" yaml:"mcp_config_path,omitempty"`
|
||||||
AntiRisk bool `json:"anti_risk,omitempty" yaml:"anti_risk,omitempty"` // global anti-risk switch
|
AntiRisk bool `json:"anti_risk,omitempty" yaml:"anti_risk,omitempty"` // global anti-risk switch
|
||||||
|
IgnorePopup bool `json:"ignore_popup,omitempty" yaml:"ignore_popup,omitempty"` // ignore popup for all steps, keep for compatibility
|
||||||
AutoPopupHandler bool `json:"auto_popup_handler,omitempty" yaml:"auto_popup_handler,omitempty"` // enable auto popup handler
|
AutoPopupHandler bool `json:"auto_popup_handler,omitempty" yaml:"auto_popup_handler,omitempty"` // enable auto popup handler
|
||||||
AIOptions *option.AIServiceOptions `json:"ai_options,omitempty" yaml:"ai_options,omitempty"`
|
AIOptions *option.AIServiceOptions `json:"ai_options,omitempty" yaml:"ai_options,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-3
@@ -797,10 +797,13 @@ func runStepMobileUI(s *SessionRunner, step IStep) (stepResult *StepResult, err
|
|||||||
if s.caseRunner != nil && s.caseRunner.Config != nil {
|
if s.caseRunner != nil && s.caseRunner.Config != nil {
|
||||||
config = s.caseRunner.Config.Get()
|
config = s.caseRunner.Config.Get()
|
||||||
}
|
}
|
||||||
// automatic handling of pop-up windows on each step finished
|
// automatic handling of pop-up windows on each step finished, default to disabled
|
||||||
// priority: testcase config > step config, default to disabled
|
// priority: testcase config ignore_popup > step ignore_popup > config auto_popup_handler > step auto_popup_handler
|
||||||
shouldHandlePopup := false
|
shouldHandlePopup := false
|
||||||
if stepIgnorePopup {
|
|
||||||
|
if config != nil && config.IgnorePopup {
|
||||||
|
shouldHandlePopup = false
|
||||||
|
} else if stepIgnorePopup {
|
||||||
// step level config, keep for compatibility
|
// step level config, keep for compatibility
|
||||||
shouldHandlePopup = false
|
shouldHandlePopup = false
|
||||||
} else if config != nil && config.AutoPopupHandler {
|
} else if config != nil && config.AutoPopupHandler {
|
||||||
|
|||||||
Reference in New Issue
Block a user