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.
Data driven link testing
Hi All,
I'm sure this is a really simple question for you all, but I'm a newbie and in need of a few pointers.
I have recorded a sample script, and everything works well, but now I'm trying to build a little more intelligence into it using variables and some if conditions, and I'm stuck on the following.
One of the elements I've recorded returns a value as follows, where 'xxxx' is the value of a parameter I pass earlier up in the test:
_click(_image("View xxxx database"));
What I want to do is parameterise that 'xxxx' value so that I can really put some interesting data through the app and see what happens:
_click(_image("View $var database"));
Now, all my combinations of concatenating the string lead to the test failing, so some pointers on where I'm going wrong would be appreciated. The most successful syntax I have is (but the link isn't clicked...):
_click(_image("View" & $var & "database"));
Thanks,
JB
I'm sure this is a really simple question for you all, but I'm a newbie and in need of a few pointers.
I have recorded a sample script, and everything works well, but now I'm trying to build a little more intelligence into it using variables and some if conditions, and I'm stuck on the following.
One of the elements I've recorded returns a value as follows, where 'xxxx' is the value of a parameter I pass earlier up in the test:
_click(_image("View xxxx database"));
What I want to do is parameterise that 'xxxx' value so that I can really put some interesting data through the app and see what happens:
_click(_image("View $var database"));
Now, all my combinations of concatenating the string lead to the test failing, so some pointers on where I'm going wrong would be appreciated. The most successful syntax I have is (but the link isn't clicked...):
_click(_image("View" & $var & "database"));
Thanks,
JB
Answers
Thanks ashwini, figured I may need to go that route so will give it a try.
JB