Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wait for the button to disappear on the webpage
#1
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

Code:
Copy      Help
// 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


Messages In This Thread
Wait for the button to disappear on the webpage - by Davider - 03-03-2024, 08:02 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)