This is a migrated thread and some comments may be shown as answers.

IsVisible returns incorrect value under IE

1 Answer 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Volodymyr
Top achievements
Rank 1
Volodymyr asked on 08 Jan 2013, 11:16 AM
Hi All,

During my test i need to verify the following span html is visible:
<span class="cvIcon"><div style="display: none;" class="tooltip"><span class="ttCond">Shown if:</span> <span class="questionShortTooltip" title="Question 1">&nbsp;</span>Choice 2 </div></span>

The IsVisible() method  for HtmlSpan returns false  under IE 9.0 even i see that span is clearly visible on page. Under FF all is working as expected.
This span has  next computed styles under IE  if I use GetComputedStyle method: display:block, visibility: inherited

Under IE the styles look like on screnshot below


We use next hardware:
 OS: Win 7 x32/64
 Browser: IE 9.0
 Browser: Firefox 17.0.1
 TTF: 2012.2.122.12.4.0

Best regards,
Volodymyr

1 Answer, 1 is accepted

Sort by
0
Tsvetko
Telerik team
answered on 10 Jan 2013, 12:24 PM
Hello,

We tried to reproduce the problem but with no success. Indeed if you have element with style “display:block, visibility: inherited” the element will be visible (as long as it’s parent is not hidden).  But also in that case element’s IsVisible method will return true.

It is possible thought that the application you test changed the element style dynamically and Test Studio has not updated its state correctly thus verify against element’s old style.

Can you try to refresh DOM tree just before the verification?
You can refresh DOM tree by calling: ActiveBrowser.RefreshDomTree();

All the best,
Tsvetko
the Telerik team
P.S. If this suggestion does not work would you provide a web page where the problem can be reproduced?
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Volodymyr
Top achievements
Rank 1
Answers by
Tsvetko
Telerik team
Share this question
or