18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Passing values from Jenkins to Sahi Scripts
Hello All,
In a scenario, we are required to pass ID of Jenkins user to SAHI. is there any way on how this can be achieved.
I can do it by writing the value to a text file and then taking it from there. but it gives me a problem that there could be multiple jenkins users executing the job at a time. there is a possibility of the value in text to get replaced by another userid. Because of which, the value has to be passed using a variable.
I saw few threads in which its said that this can be achieved using -initJS. Tried using the same but it didnot work.
Will be great help if anyone could give more details on the configurations needed to make it work or may be even another way of achieving this.
OS: windows.
SAHI: Sahi pro v5.1.2
browser: firefox.
Regards,
Sreekanth
In a scenario, we are required to pass ID of Jenkins user to SAHI. is there any way on how this can be achieved.
I can do it by writing the value to a text file and then taking it from there. but it gives me a problem that there could be multiple jenkins users executing the job at a time. there is a possibility of the value in text to get replaced by another userid. Because of which, the value has to be passed using a variable.
I saw few threads in which its said that this can be achieved using -initJS. Tried using the same but it didnot work.
Will be great help if anyone could give more details on the configurations needed to make it work or may be even another way of achieving this.
OS: windows.
SAHI: Sahi pro v5.1.2
browser: firefox.
Regards,
Sreekanth
Answers
Tried it but in sahi it said Variable not defined. This I tried in SAHI OS.
In SAHI Pro, I got it working using:
var $userJenkins = $suiteInfo["customField"];
for this, I gave following in ant script.
<customfield key="customField" value="${BUILD_USER_ID}"/>