IsVisible returns incorrect value under IE

2 posts, 0 answers
  1. Volodymyr
    Volodymyr avatar
    11 posts
    Member since:
    Nov 2012

    Posted 08 Jan 2013 Link to this post

    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
  2. Tsvetko
    Admin
    Tsvetko avatar
    1 posts

    Posted 10 Jan 2013 Link to this post

    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
Back to Top