refactor: parameterize submit delay

This commit is contained in:
2023-12-27 07:38:48 +01:00
parent cc7a59c109
commit 69389d030b
6 changed files with 27 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import (
"log"
"time"
"gitea.urkob.com/urko/go-wifi-switcher/pkg/provider"
"github.com/go-rod/rod"
)
@@ -66,7 +67,7 @@ func (p Huawei) Login(user, pass string) error {
return nil
}
func (p Huawei) SwitchWIFI() error {
func (p Huawei) SwitchWIFI(cfg provider.SwitchConfig) error {
net, err := p.page.Element(p.netID)
if err != nil {
return fmt.Errorf("page.Element %s: %s", p.netID, err)