mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-06 16:07:45 +08:00
fix: avoid panic when ActionOptions is nil
This commit is contained in:
@@ -106,6 +106,10 @@ type ActionOptions struct {
|
|||||||
func (o *ActionOptions) Options() []ActionOption {
|
func (o *ActionOptions) Options() []ActionOption {
|
||||||
options := make([]ActionOption, 0)
|
options := make([]ActionOption, 0)
|
||||||
|
|
||||||
|
if o == nil {
|
||||||
|
return options
|
||||||
|
}
|
||||||
|
|
||||||
if o.Identifier != "" {
|
if o.Identifier != "" {
|
||||||
options = append(options, WithIdentifier(o.Identifier))
|
options = append(options, WithIdentifier(o.Identifier))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -447,6 +447,7 @@ var popups = [][]string{
|
|||||||
{".*青少年.*", "我知道了"}, // 青少年弹窗
|
{".*青少年.*", "我知道了"}, // 青少年弹窗
|
||||||
{".*个人信息保护.*", "同意"},
|
{".*个人信息保护.*", "同意"},
|
||||||
{".*更新.*", "以后再说"},
|
{".*更新.*", "以后再说"},
|
||||||
|
{".*定位.*", ".*允许.*"},
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dExt *DriverExt) autoPopupHandler(ocrResult *OcrResult) error {
|
func (dExt *DriverExt) autoPopupHandler(ocrResult *OcrResult) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user