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.
how to read key-value from a propety file in sahi scripts?
I want to know how do i Externalize the IDs and then read them in my sahi scripts.
I want this because, if the IDs are changed very often,we can change them in property file but th scripts remain same.
An example will help me lot.
Thanks in advance.
I want this because, if the IDs are changed very often,we can change them in property file but th scripts remain same.
An example will help me lot.
Thanks in advance.
Comments
Put your key values like this:
$nameId = "userName";
$ageId = "age";
And then include it as a regular Sahi include using
// Include this file where ever you want
_include("keyValues.sah");
// Access variables normally
_setValue(_textbox($nameId), "User One");
_setValue(_textbox($ageId), "56");