Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to take screenshots for UI element?
#3
Not the answer, but may be useful for those looking for "capture UI element screenshot" code. This script finds an UI element, captures its screenshot, saves in a file and opens the file.

Code:
Copy      Help
// script ""
var w = wnd.find(0, "*Mozilla Firefox");
w.Activate();
var e = w.Elm["web:LINK", "Edit"].Find(0);
using var bitmap = CaptureScreen.Image(e.Rect);
var file = folders.ThisAppTemp + "UI element screenshot.png";
bitmap.Save(file);
run.it(file);


Messages In This Thread
RE: How to take screenshots for UI element? - by Gintaras - 05-10-2023, 04:27 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)