Compare commits
No commits in common. "fc35559ab8188702b33d81e3e096f4e4c06c6fbf" and "cc9c9354bc8ce68617bfb373c1071c4b619d0fa1" have entirely different histories.
fc35559ab8
...
cc9c9354bc
|
@ -56,7 +56,7 @@ func (p ArcherAx50) Login(user, pass string) error {
|
|||
}
|
||||
|
||||
func (p ArcherAx50) SwitchWIFI() error {
|
||||
time.Sleep(time.Millisecond * 1350)
|
||||
time.Sleep(time.Second * 1)
|
||||
pageURL := p.page.MustInfo().URL
|
||||
log.Println("p.page.MustInfo().URL", pageURL)
|
||||
|
||||
|
@ -67,7 +67,7 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
wirelessTab.MustClick()
|
||||
log.Println(p.wirelessTab, "DONE")
|
||||
|
||||
time.Sleep(time.Millisecond * 1250)
|
||||
time.Sleep(time.Millisecond * 750)
|
||||
checked := p.page.MustEvaluate(&rod.EvalOptions{
|
||||
JS: `() => {
|
||||
return document.getElementById('` + p.chkWifi2gID + `').checked;
|
||||
|
@ -75,7 +75,6 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
})
|
||||
|
||||
isChecked := checked.Value.Bool()
|
||||
log.Println(getCheckedMessage(isChecked))
|
||||
p.page.MustEvaluate(&rod.EvalOptions{
|
||||
JS: `() => {
|
||||
document.getElementById('` + p.chkWifi2gID + `').checked=` + fmt.Sprint(!isChecked) + `;
|
||||
|
@ -94,11 +93,3 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
time.Sleep(time.Millisecond * 1500)
|
||||
return nil
|
||||
}
|
||||
|
||||
func getCheckedMessage(isChecked bool) string {
|
||||
if isChecked {
|
||||
return "Time to sleep, let's switch off"
|
||||
}
|
||||
|
||||
return "Time to laborate, let's switch WIFI on"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue