question

gsivasam avatar image
gsivasam asked gsivasam posted

How to verify hidden objects in a page using fanfare

Hi,

 

      I need to automate a scenario where after enabling certain option (say an option A) in a page by clicking checkbox, some other objects (say object B) in the same page will get hidden. I need to verify whether after enabling the checkbox A, the object B got hidden. How to verify this scenario using fanfare. I have tried using performing actions to hidden object like getInnerText, description, show table, but in all cases the hidden object is recognised. Looking the page manually the object is hidden but via script using fanfare the hidden object is recognised. Could you please let me know how to solve this issue ?

 

Thanks,

Gnans.

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.

1 Answer

·
KumarS avatar image
KumarS answered KumarS posted

After you perform your click checkbox action, you can use "snapshot" to get an XML representation of  whole page. Now you can use XPATH query to check:

1. either your control count is zero (if it has completely disappeared from the tree of controls)

2. check if your specified control has some sort of attribute which suggests that it is disabled.

Message Edited by KumarS on 07-10-2009 09:25 AM
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.

gsivasam avatar image gsivasam commented ·

Hi Kumar,

 

Thanks for your reply. I have tried with snapshot options also it doesnt works for my case.

 

Thanks,

Gnans.

0 Likes 0 ·
KumarS avatar image KumarS gsivasam commented ·
If you post the contents of the response and structure for the snapshot step and tell us what control you are interested in, someone may post a solution for you.
0 Likes 0 ·
PreetS avatar image PreetS KumarS commented ·

A better way would be to use "describe" on the control. 

Snapshot does not contain all possible propertiees of a control. 

 

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.