Compare commits
2 Commits
bf700eeeb3
...
62bda54d98
Author | SHA1 | Date |
---|---|---|
Urko | 62bda54d98 | |
Urko | 0933174ea1 |
|
@ -29,7 +29,7 @@ func NewArcherAx50(page *rod.Page) ArcherAx50 {
|
|||
}
|
||||
|
||||
func (p ArcherAx50) Login(user, pass string) error {
|
||||
time.Sleep(time.Millisecond * 1850)
|
||||
time.Sleep(time.Millisecond * 5550)
|
||||
|
||||
p.page.MustEvaluate(&rod.EvalOptions{
|
||||
JS: `() => {
|
||||
|
@ -38,7 +38,7 @@ func (p ArcherAx50) Login(user, pass string) error {
|
|||
v.focus();
|
||||
v.value="` + pass + `";
|
||||
})
|
||||
return log;
|
||||
return '';
|
||||
}`,
|
||||
})
|
||||
|
||||
|
@ -57,7 +57,7 @@ func (p ArcherAx50) Login(user, pass string) error {
|
|||
}
|
||||
|
||||
func (p ArcherAx50) SwitchWIFI() error {
|
||||
time.Sleep(time.Millisecond * 1350)
|
||||
time.Sleep(time.Millisecond * 1850)
|
||||
pageURL := p.page.MustInfo().URL
|
||||
log.Println("p.page.MustInfo().URL", pageURL)
|
||||
|
||||
|
@ -68,7 +68,7 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
wirelessTab.MustClick()
|
||||
log.Println(p.wirelessTab, "DONE")
|
||||
|
||||
time.Sleep(time.Millisecond * 1250)
|
||||
time.Sleep(time.Millisecond * 1850)
|
||||
checked := p.page.MustEvaluate(&rod.EvalOptions{
|
||||
JS: `() => {
|
||||
return document.getElementById('` + p.chkWifi2gID + `').checked;
|
||||
|
@ -84,6 +84,7 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
}`,
|
||||
})
|
||||
|
||||
time.Sleep(time.Millisecond * 150)
|
||||
log.Println(p.chkWifi2gID, "DONE")
|
||||
saveButton, err := p.page.Element(p.saveButtonID)
|
||||
if err != nil {
|
||||
|
@ -92,7 +93,7 @@ func (p ArcherAx50) SwitchWIFI() error {
|
|||
saveButton.MustClick()
|
||||
log.Println(p.saveButtonID, "DONE")
|
||||
|
||||
time.Sleep(time.Millisecond * 1500)
|
||||
time.Sleep(time.Millisecond * 5500)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue