hey!!!
I am using describe in my testcase which has a dynamic id which i cannot use another time.if i replace this id with static id then the describe does not fetch all the information from the page.how can i resolve this?
Answer by madhuri katta · Dec 27, 2012 at 01:06 PM
Hi,
As per my understanding, your query is that you have a div id which will be changing dynamically after every execution and due to this your test is failing.
If this is the case, please try the below steps:
1. Add a snapshot command before describe command
2. From "structure view" search for the DIV id and store the id value in a variable by adding an analysis rule (right clicking on DIV id->Quick analysis rule-> as shown in below screenshot)
3. Use that stored variable in describe command at id as shown in the attached testcase and it will pick that dynamic id from the web page automatically.
Hope it helps you!
Please let me know if i missed anything here.
Hey!!
Even i m following the same method that u showed in the snapshot.but the describe with variable is not working in my case.
Hi Neha,
That might be substitution issue. Please make sure that you have enabled "F" at the Target field in step properties of describe action.
Thanks!
Hi,
Also make sure that you are using back slashes before the square brackets '[' and ']' in the command.
://DIV\[@id='$var1'\]/DIV;
Hope it helps you.
Thanks!
Answer by Mallikarjunarao Kosuri · Mar 08, 2013 at 09:07 AM
iTest needs to log a message when respond to dialog box in a web session 1 Answer
Web-session button doesn’t work sometimes 3 Answers
Testing html5? 1 Answer
Issues with setText 2 Answers
Trigger Event on HTTP Status Codes 1 Answer
Copyright 2008- Spirent Communications, all rights reserved. Terms and Conditions.