I need to display a message box when the "Stop generating" disappears. The following code is not working. Below is a GIF demo.
https://i.ibb.co/mbj1s9P/aaa.gif
There may be multiple ways to achieve the goal
https://i.ibb.co/mbj1s9P/aaa.gif
// script "chatGPT_T.cs"
//.
script.setup(trayIcon: true, sleepExit: true);
//..
var w = wnd.find(1, "*- Google Chrome", "Chrome_WidgetWin_1");
//send text
var e = w.Elm["web:TEXT", "Message ChatGPT…"].Find(1);
e.MouseClick(); keys.send("Ctrl+A", "!c# and powershell diff");
//click send-button
var e2 = w.Elm["web:BUTTON", prop: "@data-testid=send-button"].Find(1);
e2.MouseClick();
2.s();
var e3 = w.Elm["web:BUTTON", "Stop generating", "@aria-label=Stop generating"].Find(1);
wait.until(30, () => !e3.IsInvisible);
dialog.show("ok");
There may be multiple ways to achieve the goal