file transfer occurred #1

Open
huseyindervis wants to merge 19 commits from bordorBot into main
2 changed files with 13 additions and 13 deletions
Showing only changes of commit a5612d6d9e - Show all commits

View File

@@ -534,17 +534,6 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
return err
}
var foundIndex int = -1
if len(elems) == 0 {
err = ClickItem(frame3, "body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(3)", 1)
if err != nil {
return err
}
err = WaitLoad(frame3)
if err != nil {
return err
}
return errors.New("Böyle Bir Kullanıcı Bulunamadı")
}
for j := 0; j < len(elems); j++ {
tex, err := elems[j].Text()
if err != nil {
@@ -563,6 +552,17 @@ func (l *Luca) BordroYaz(month, year int, b *LucaBordro, lastItem bool) error {
}
fmt.Print(elems, tex)
}
if foundIndex == -1 {
err = ClickItem(frame3, "body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(3)", 1)
if err != nil {
return err
}
err = WaitLoad(frame3)
if err != nil {
return err
}
return errors.New("Böyle Bir Kullanıcı Bulunamadı")
}
if isEmpty == true {
err = ClickItem(frame3, "body > form > table > tbody > tr.altBar.alt-button-bar > th > table > tbody > tr > td:nth-child(1) > button:nth-child(3)", 1)
if err != nil {

View File

@@ -136,10 +136,10 @@ func (s *Srv) Rpa(companyName string, month float64, year float64) error {
err := b.BordroYaz(int(month), int(year), brd, lastItem)
var str string
if err != nil {
emitLog(err.Error())
emitLog("Şube : " + brd.Sube + "Bölüm : " + brd.Bolum + "Kullanıcı Adı: " + brd.AdSoyad + err.Error())
} else {
str = "Şube : " + brd.Sube + "Bölüm : " + brd.Bolum + "işlem başarılı, "
str = "Şube : " + brd.Sube + "Bölüm : " + brd.Bolum + "işlem başarılı, " + "Kullanıcı Adı: " + brd.AdSoyad
emitLog(str)
}