Compare commits

..

2 Commits

Author SHA1 Message Date
Urko bbc94e0375 polish logs 2023-07-02 23:08:07 +02:00
Urko ad8ed58366 feat increase wait 2023-07-02 22:16:17 +02:00
1 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,7 @@ func NewArcherAx50(page *rod.Page) ArcherAx50 {
} }
func (p ArcherAx50) Login(user, pass string) error { func (p ArcherAx50) Login(user, pass string) error {
time.Sleep(time.Millisecond * 1250) time.Sleep(time.Millisecond * 1850)
p.page.MustEvaluate(&rod.EvalOptions{ p.page.MustEvaluate(&rod.EvalOptions{
JS: `() => { JS: `() => {
@ -38,9 +38,10 @@ func (p ArcherAx50) Login(user, pass string) error {
v.focus(); v.focus();
v.value="` + pass + `"; v.value="` + pass + `";
}) })
return ''; return log;
}`, }`,
}) })
time.Sleep(time.Millisecond * 250) time.Sleep(time.Millisecond * 250)
log.Println(p.passwordID, "DONE") log.Println(p.passwordID, "DONE")
@ -51,7 +52,7 @@ func (p ArcherAx50) Login(user, pass string) error {
} }
login.MustClick() login.MustClick()
log.Println(p.loginButtonID, "DONE") log.Println(p.loginButtonID, "DONE")
time.Sleep(time.Millisecond * 850) time.Sleep(time.Millisecond * 1550)
return nil return nil
} }