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 manage Dynamic fields (if the fields names change dynamically)
OS : Windows 7
Browser : Firefox 7.0.1
Sahi Build: 2011-07-19
Hi
Advise me.. How to manage Dynamic fields in a form (if the fields names change dynamically in the form on each run of my script)?
Let me make it clear by giving an example :
first time when i run the script the textbox fieldname will be say.. abc_1011_name
the second time the field name may change to abc_1013_name or abc_1015_name depends on the no of times many users used the same field to store/save data to db.
give a reply soon please.
George
Browser : Firefox 7.0.1
Sahi Build: 2011-07-19
Hi
Advise me.. How to manage Dynamic fields in a form (if the fields names change dynamically in the form on each run of my script)?
Let me make it clear by giving an example :
first time when i run the script the textbox fieldname will be say.. abc_1011_name
the second time the field name may change to abc_1013_name or abc_1015_name depends on the no of times many users used the same field to store/save data to db.
give a reply soon please.
George
Comments
Kindly use : /abc_10/
Check if this solves your issue.
Regards
Sumitra
thats another problem.. so i want to know a solution how to take the fieldname which is used at the time i arrive the form.
george
In that case, you will have to use:
/.*/ instead of abc_1022_name
Check if this solves your issue.
Regards
Sumitra
thanks a lot
george
If you use /.*/ it will consider all the textboxs what ever is the id of the textbox.
For Eg: If you want to set a value in the text box2 then /.*/ wont work because Sahi wont know where the textbox is present. In that case you will have to use DOM relation.( i.e _in(),_under(),_near()) API's.
For more details: http://sahi.co.in/w/all-apis
Regards
Sumitra
thanks sumitra
George