question

amar avatar image
amar asked amar posted

problem with dynamic id

In my GUI testing case i have one button, which generate dynamic id each time. Itest can not find this dynamic id each time. so, what can be place insted of dynamic id..

iTestGUI Testing(Web-Java Swing-etc)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

udaya avatar image
udaya answered udaya posted

Hey Amar,

 

You can use regular expression but if the structure changes then it will also fail.
 (hope it will not do so as it is a button name)

 

The best way:

 

1. Take a snapshot of the page. (earlier to the button)

2. in the response (XML type) find the exact name and made an analysis rule using query and store the id (dynamic) in a variable.

3. Later use the variable in the script for specified button action (Make sure field repleacement enabled)

 

Hope this will help you and exploring more iTest features!!

 

 

 

 

 

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

neha avatar image neha commented ·

hey!!

 

if it is just a talk of button,then itest allows the input of button.

 

for eg:-://button[contains(text(),'Save')];

0 Likes 0 ·
mallikarjunarao avatar image
mallikarjunarao answered mallikarjunarao posted
Use regexp for analysis rule it will help.
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.