Hi again, once again I urgently need help as I am currently in the middle of
testing a big project.

I am having a problem to verify text from a page source (within a Javascript
code). Upon thorough investigation, I have found out that verify text always
fails due to the javascript code is referenced from an external file.

Let me explain in more detail:

A real example is www.careerone.com.au

Looking at the page source via a standard view page source from firefox
gives me the following javascript within the the source:

        <table id="ad-banner-wrap">
        <tr>
        <td>
        <div class="adbanner">

                <script language="javascript" 
src="/new/js/advertising.js"></script>
                
                <NOSCRIPT>
                <A 
HREF="http://mercury.tiser.com.au/adclick/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=1";>
                <IMG 
SRC="http://mercury.tiser.com.au/nserver/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=1";></A>
                </NOSCRIPT>
        </div>
</td>
</tr>



However, looking at the page source via View source chart (Firefox add
on), it gives the following output:

<table id="ad-banner-wrap">

<tbody><tr><td><div class="adbanner"><script language="javascript"
src="/new/js/advertising.js">
</script>
<script type="TEXT/JAVASCRIPT" src="
http://mercury.tiser.com.au/jserver/acc_random=54550342/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=49443803
">
</script>
<a href="
http://mercury.tiser.com.au/ADCLICK/CID=0000c3b18648ee5900000000/acc_random=54550342/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=49443803";
target="_NEW">
  <img src="
http://saturn.tiser.com.au/images/Cone_10744_DeptCommServices_HP_Banner.gif";
alt="" border="0">
</a>
<noscript>
<A HREF="
http://mercury.tiser.com.au/adclick/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=1
">
<IMG SRC="
http://mercury.tiser.com.au/nserver/SITE=CONE/AREA=CLASS.JOBS.HOME/AAMSZ=468X60/pageid=1
">
</A>
</noscript>
</div>
</td>
</tr>
</tbody>
</table>


</table>

You can see that the page source generated by View Source Chart gives more
code as it pulls from external javascript file. Is it possible to verify a
text within a code generated from external file? Let say, I want to test
DeptCommServices which as you can see one of the text generated from
external file.

<webtest name="test"/>
<config
autorefresh="true">
</config>
<invoke url="www.careerone.com.au"/>
<verifyText text="DeptCommServices"/>

The above script would always fail due to webtest could not find the text
since it is generated from external file. Is there a way to work around
this?

Thanks



>
>
>

Reply via email to