File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ func Bard() {
26
26
page_bard .MustNavigate ("https://bard.google.com" )
27
27
28
28
for i := 1 ; i <= 30 ; i ++ {
29
- if page_bard .MustHasX ("//textarea[@id='mat-input-0']" ) {
29
+ //if page_bard.MustHasX("//textarea[@id='mat-input-0']") {
30
+ if page_bard .MustHasX ("//rich-textarea[@aria-label='Input for prompt text']" ) {
30
31
relogin_bard = false
31
32
break
32
33
}
@@ -58,7 +59,7 @@ func Bard() {
58
59
select {
59
60
case question := <- channel_bard :
60
61
//page_bard.MustActivate()
61
- page_bard .MustElementX ("//textarea[@id='mat-input-0 ']" ).MustWaitVisible ().MustInput (question )
62
+ page_bard .MustElementX ("//rich- textarea[@aria-label='Input for prompt text ']" ).MustWaitVisible ().MustInput (question )
62
63
page_bard .MustElementX ("//button[@mattooltip='Submit']" ).MustClick ()
63
64
fmt .Println ("Bard generating..." )
64
65
//page_bard.MustActivate()
@@ -76,7 +77,7 @@ func Bard() {
76
77
}
77
78
if generated_icon_appear == true {
78
79
img := page_bard .MustElementX ("//img[contains(@src, 'https://www.gstatic.com/lamda/images/sparkle_resting_v2_1ff6f6a71f2d298b1a31.gif')][last()]" ).MustWaitVisible ()
79
- response := img .MustElementX ("parent::div/parent::div" ).MustWaitVisible ()
80
+ response := img .MustElementX ("parent::div/parent::bard-logo/parent::div/parent:: div" ).MustWaitVisible ()
80
81
answer := response .MustText ()
81
82
channel_bard <- answer
82
83
} else {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import (
32
32
33
33
var trace = false
34
34
35
- // var trace = true
35
+ //var trace = true
36
36
var userInput string
37
37
var color_bard = tcell .ColorDarkCyan
38
38
var color_bing = tcell .ColorDarkMagenta
You can’t perform that action at this time.
0 commit comments