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.

How to create a function for random popup name?

arunrsarunrs Members
edited May 2013 in Sahi Pro
Hi

I'm new to this forum
i have a doubt in creating function for Random pop up name
in our application the script is showing as
_click(_submit("Sign In"));
_popup("_self367")._click(_cell("New Requests"));
_popup("_self367")._click(_cell("Back"));
_popup("_self367")._click(_cell("Sign Out"));
while i tried to replace the random popup popup name with "/.*/" its working as below
_click(_submit("Sign In"));
_popup("/.*/")._click(_cell("New Requests"));
_popup("/.*/")._click(_button("Back"));
_popup("/.*/")._click(_cell("Sign Out"));

but i want to create as whole scenario as new function name as login()
when i tried this as


/* --Objects Definitions Above-- */
function login($){
_popup($)._click(_cell("New Requests"));
_popup($)._click(_button("Back"));
_popup($)._click(_cell("Sign Out"));
}
/* --Functions Above-- */
_setValue(_textbox("userDto.userName"), "test");
_setValue(_password("userDto.password"), "test");
login("/.*/");

its not working
anybody please help
we are doing an evaluation test ,so that all are our functionality testing requirement should satisfy with sahi pro

Sign In or Register to comment.