[Webtest] <verifyText>: Add an attribute "ignoreHiddenText"
Christoph Witych
Christoph Witych" <Witych@atrada.net
Fri, 15 Feb 2008 15:05:38 +0100
This is a multi-part message in MIME format.
------_=_NextPart_001_01C86FDB.D7D17C70
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi Marc, hi all,
=20
<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=3D"display: none"> so that it is
apparently not displayed by the browser and therefore invisible for a
human being.
=20
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?
=20
Or better write a new tag <verifyDisplayedText> that ignores all
html-tags and hidden text maybe as an extension of <tagStripper>?
=20
Does anybody encounter similar problems?
=20
Comments are welcome.
=20
Cheers,
Christoph
=20
------_=_NextPart_001_01C86FDB.D7D17C70
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.emailformatvorlage17
{font-family:Arial;
color:windowtext;}
span.EmailFormatvorlage18
{font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DDE link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Hi Marc, hi all,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
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=3D“display:
none“> so that it is apparently not displayed by the browser =
and
therefore invisible for a human being.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
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 class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
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 class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Does anybody encounter similar =
problems?</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Comments are welcome.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Cheers,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Christoph</span></font></p>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C86FDB.D7D17C70--