[Webtest] <verifyText>: Add an attribute "ignoreHiddenText"
John and Pip
John and Pip" <pipandjohn@gmail.com
Sat, 16 Feb 2008 12:28:54 +1300
------=_Part_874_29798682.1203118134860
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
That would certainly make me happy! This causes problems in my testing.
I guess there is a way to code this using verifyXPath, which has the
advantage over verifyText that it will handle DHTML updates to the style. If
we can figure out the correct XPath then I guess that could be made into a
custom step initially, and then perhaps a standard one.
regards,
John
On Sat, Feb 16, 2008 at 3:05 AM, Christoph Witych <Witych@atrada.net> wrote:
> Hi Marc, hi all,
>
>
>
> <verifyText> will yield true if the searched text is in the page. So far
> so good. I face the problem that this behaviour will the same even if the
> text is sorrounded by a <div style="display: none"> so that it is apparently
> not displayed by the browser and therefore invisible for a human being.
>
>
>
> Does it make sense to add an attribute, for example named
> "ignoreHiddenText" (default: false, not to affect existing tests. Better
> default: true, which would be more intuitive) so that webtest only finds
> text, that is visible in the browser?
>
>
>
> Or better write a new tag <verifyDisplayedText> that ignores all html-tags
> and hidden text maybe as an extension of <tagStripper>?
>
>
>
> Does anybody encounter similar problems?
>
>
>
> Comments are welcome.
>
>
>
> Cheers,
>
> Christoph
>
>
>
------=_Part_874_29798682.1203118134860
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,<br><br>That would certainly make me happy! This causes problems in my testing.<br><br>I guess there is a way to code this using verifyXPath, which has the advantage over verifyText that it will handle DHTML updates to the style. If we can figure out the correct XPath then I guess that could be made into a custom step initially, and then perhaps a standard one.<br>
<br>regards,<br> John<br><br><div class="gmail_quote">On Sat, Feb 16, 2008 at 3:05 AM, Christoph Witych <<a href="mailto:Witych@atrada.net" target="_blank">Witych@atrada.net</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="DE">
<div>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Hi Marc, hi all,</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"><verifyText> will yield true if the searched text is
in the page. So far so good. I face the problem that this behaviour will the
same even if the text is sorrounded by a <div style="display:
none"> so that it is apparently not displayed by the browser and
therefore invisible for a human being.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Does it make sense to add an attribute, for example named
"ignoreHiddenText" (default: false, not to affect existing tests.
Better default: true, which would be more intuitive) so that webtest only finds
text, that is visible in the browser?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Or better write a new tag <verifyDisplayedText> that
ignores all html-tags and hidden text maybe as an extension of
<tagStripper>?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Does anybody encounter similar problems?</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Comments are welcome.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Cheers,</span></font></p>
<p><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;">Christoph</span></font></p>
<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>
</div>
</div>
</blockquote></div><br>
------=_Part_874_29798682.1203118134860--