feat: set timeout for Call function

This commit is contained in:
lilong.129
2025-05-12 08:48:54 +08:00
parent f6ad6c9eff
commit 7a6890a160
4 changed files with 35 additions and 12 deletions
+2 -2
View File
@@ -449,12 +449,12 @@ func (s *StepMobile) ClosePopups(opts ...option.ActionOption) *StepMobile {
return s
}
func (s *StepMobile) Call(name string, fn func()) *StepMobile {
func (s *StepMobile) Call(name string, fn func(), opts ...option.ActionOption) *StepMobile {
s.obj().Actions = append(s.obj().Actions, uixt.MobileAction{
Method: uixt.ACTION_CallFunction,
Params: name, // function description
Fn: fn,
Options: nil,
Options: option.NewActionOptions(opts...),
})
return s
}