diff --git a/main.go b/main.go index ad1e914..9c64eb4 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,6 @@ import ( func main() { config := cfg.NewConfig("./.env") - log.Println("config", config) log.SetFlags(log.Lmicroseconds) if config.LogFile { @@ -59,35 +58,19 @@ func main() { page.MustElement(`input[value="Skip"]`).MustClick() log.Println("SKIP DONE") - time.Sleep(time.Second * 3) - - printContent(page) - - net := page.MustElement("#Net") - log.Println("Net", net) - net.MustClick() + page.MustElement("#Net").MustClick() log.Println("Net DONE") - wlan := page.MustElement("#Net-WLAN") - log.Println("wlan", wlan) - wlan.MustClick() + page.MustElement("#Net-WLAN").MustClick() log.Println("Net-WLAN DONE") mainFrame := page.MustElement("#mainFrame").MustFrame() mainFrame.MustElement("#wlanEnable").MustClick() log.Println("wlanEnable DONE") - printContent(mainFrame) mainFrame.MustElement("#sysSubmit").MustClick() + // TODO: improve this and wait until something should happens (refresh) + time.Sleep(time.Second * 3) log.Println("task completed") } - -func printContent(page *rod.Page) { - content, err := page.HTML() - if err != nil { - log.Fatalf("page.HTML: %s\n", err) - } - - log.Println("content", content) -}