18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

PID from .sah

tower120tower120 Members
edited November -1 in Sahi - Open Source
Hi!

Is it possible somehow to get PID of the browser process where sahi script running? I see in sahi proxy log that ProcessHelper operates with some PID.

Comments

  • narayannarayan Administrators
    It is available inside Sahi. Sahi uses it to kill the browser at the end.
    It is not exposed to script. Any reason why you need it?

    Regards,
    Narayan
  • tower120tower120 Members
    I need to make screenshoots from suite (batch run of test).

    Since I can't just get make screenshoot with java robot (cuz our browser may be hided with other browser), I write a small program on C++ - using WinAPI I get window handler, then rendered bitmap content from it, and save it to file. It is possible to make video the same way.

    To get correct window I need PID.

    In java I'll write package that will send PID and path to screenshoots storage. Than I'll include this package in my test script.


    How I can add lets say _sahi.PID to injected script?
Sign In or Register to comment.