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.
Queries regarding automating ZK application testing
Hi
I have the following queries regarding automation of a ZK application
1. We have got a number of test cases for which it is possible to record separate scripts. How can these be run sequentially? Is it always necessary to open the Sahi control to playback the recorded script?
2.A ZK page contains a grid view of some records. Now while recording, the grid contained say 'n'
number of rows. After recording it should contain 'n+1'. So when the same script is played back, it fails since all components have been accessed based on its position in the page. What should be typically done for such cases?
3.There are certain test cases which require the user to type in unique values each time(say email id of an user). Now while recording the script, how can this data be made unique?How to get the current date or timestamp in the script?
4.Can one sahi script be embedded into another? If so, we could create a base script which invokes others in a particular sequence.
....phew! A lot of Qs ,I know... hope you guys have answers to these..
I have the following queries regarding automation of a ZK application
1. We have got a number of test cases for which it is possible to record separate scripts. How can these be run sequentially? Is it always necessary to open the Sahi control to playback the recorded script?
2.A ZK page contains a grid view of some records. Now while recording, the grid contained say 'n'
number of rows. After recording it should contain 'n+1'. So when the same script is played back, it fails since all components have been accessed based on its position in the page. What should be typically done for such cases?
3.There are certain test cases which require the user to type in unique values each time(say email id of an user). Now while recording the script, how can this data be made unique?How to get the current date or timestamp in the script?
4.Can one sahi script be embedded into another? If so, we could create a base script which invokes others in a particular sequence.
....phew! A lot of Qs ,I know... hope you guys have answers to these..
This discussion has been closed.
Comments
1. We have got a number of test cases for which it is possible to record separate scripts. How can these be run sequentially? Is it always necessary to open the Sahi control to playback the recorded script?
Have a look at http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
2.A ZK page contains a grid view of some records. Now while recording, the grid contained say 'n'
number of rows. After recording it should contain 'n+1'. So when the same script is played back, it fails since all components have been accessed based on its position in the page. What should be typically done for such cases?
Do not use index to identify the elements. Use _near, _in, _under etc. Have a look at
http://sahi.co.in/w/browser-accessor-apis
and
http://sahi.co.in/w/sahi-api-examples
3.There are certain test cases which require the user to type in unique values each time(say email id of an user). Now while recording the script, how can this data be made unique?How to get the current date or timestamp in the script?
var $userId = "user_" + (new Date()).toString().replace(/ /g, '');
or
var $userId = "user_" + java.lang.System.currentTimeMillis();
4.Can one sahi script be embedded into another? If so, we could create a base script which invokes others in a particular sequence.
Use _include to include one file in another.
Hope that helps.
Regards,
Narayan