question

neha avatar image
neha asked mallikarjunarao answered

describe a div

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?

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.

mallikarjunarao avatar image
mallikarjunarao answered
neha, could you try with div name tag? might be name is static one Thanks [ http://tclscripting.blogspot.in/][1] [1]: http://tclscripting.blogspot.in/
10 |950

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

madhuri avatar image
madhuri answered madhuri posted

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.

 


Web.fftc (3.7 KiB)
web.ffsp (320 B)
Untitled.png (69.1 KiB)
3 comments
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!!

 

Even i m following the same method that u showed  in the snapshot.but the describe  with variable is not working in my case.

0 Likes 0 ·
madhuri avatar image madhuri ♦ neha commented ·

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!

 

 

 

0 Likes 0 ·
Untitled.png (13.7 KiB)
madhuri avatar image madhuri ♦ madhuri ♦ commented ·

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!

0 Likes 0 ·

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.