@@ -85,20 +85,33 @@ func Llama2() {
85
85
//page_llama2.Timeout(10 * time.Second).MustElementX("//button[contains(text(), 'Stop')]").MustWaitVisible().CancelTimeout()
86
86
page_llama2 .Timeout (10 * time .Second ).MustElementX ("//button[@id='component-15']" ).MustWaitVisible ().CancelTimeout ()
87
87
})
88
+ //fmt.Println("find stop button")
88
89
if err == nil {
89
90
err = rod .Try (func () {
90
91
//page_llama2.Timeout(80 * time.Second).MustElementX("//button[contains(text(), 'Stop')]").MustWaitInvisible().CancelTimeout()
91
92
page_llama2 .Timeout (80 * time .Second ).MustElementX ("//button[@id='component-15']" ).MustWaitInvisible ().CancelTimeout ()
93
+ //fmt.Println("disappear stop button")
92
94
})
93
95
if err == nil {
94
96
stop_icon_disappear = true
95
97
} else {
96
- //fmt.Println("err:::: ", err)
98
+ //fmt.Println("err in find disappear stop button ", err)
97
99
}
98
100
} else {
99
- //fmt.Println("err:: ", err)
101
+ //fmt.Println("err in find stop button ", err)
100
102
}
101
103
104
+ //if page_llama2.MustHas("span:contains('Error')") {
105
+ fmt .Println ("finding Error" )
106
+ if page_llama2 .MustHasX ("//span[contains(text(), 'Error')]" ){
107
+
108
+ //fmt.Println("find Error")
109
+ channel_llama2 <- "✘✘ Llama2, Please check the internet connection and verify login status."
110
+ relogin_llama2 = true
111
+ }
112
+
113
+
114
+
102
115
if stop_icon_disappear == true {
103
116
//answer := page_llama2.MustElementX("(//div[@data-testid='bot'])[last()]").MustText()
104
117
answer := page_llama2 .MustElementX ("(//button[@data-testid='bot'])[last()]" ).MustText ()
0 commit comments