[Webtest] Xpath Not Finding Applet Tag

Paul King Paul King <paulk@asert.com.au>
Wed, 23 May 2007 06:25:02 +1000


I wonder if the MAYSCRIPT is throwing it off.

Paul.

Rich Toulouse wrote:
> Hi there,
>  
> I'm having a bit of a problem trying to get webtest to find the applet 
> in the page.  I've tried the following:
> /html/body/div/applet[@name='Launcher']
> /html/body/div[@id='appletdiv']/applet[@name="'Launcher']
> //div[@id='appletdiv']/applet[@name='Launcher"]
> //div[@id='appletdiv']/applet[1]
>  
> None of those work.  I keep getting an error like this:
>  
> Running with: Canoo Webtest: R_1562.
> Exception thrown from this class: 
> com.canoo.webtest.engine.StepFailedException
> Message was: The specified element <//div[@id='appletdiv']/applet[1]> 
> was not found.
> Running with: Canoo Webtest: R_1562.
>  
> Does anyone see what I might be doing wrong?
>  
> Thanks!
>  
> Rich
>  
> Here's the HTML.
>  
> 
> <html>
> <head>
> <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
> <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
> <meta HTTP-EQUIV="Expires" CONTENT="0">
> <script language="JavaScript" type="text/javascript">
> </script>
> <script language="JavaScript" type="text/javascript" 
> src="/rweb/gm/writeapplets.js"></script>
>  
> <title>Reflection</title>
> <style type="text/css">
> </style>
> </head>
> <body onload="testForJava();">
>  
> <IMG src="./RWeb_M.gif" alt="Reflection"><BR>
> <div id="appletdiv">
>  
> 
> <applet name="tester" code="com.wrq.util.browser.JavaTest" codebase="" 
> height=0 width=0 archive="JavaTestApplet.jar">
> </applet>
> <applet MAYSCRIPT name="Launcher" code="Launcher.class" archive=""
>         codebase=""
>         width="500"
>         height="440">
>     <param name="cabbase" value="Launcher.cab">
>  <param name="launcher.id" value="1">
>  <param name="ServletURL" value=">
>  <param name="jsessionid" value="">
>  <param name="launcher.sessionurl" value="">
>    <param name="smartcardDllNames" value="">
>    <param name="cache_archive" value="">
>  
>  
>  
>    <param name="cache_version" value="9.6.10.016">
> </applet>
>  
> </div>
> <div id="msg">
>  
> </div>
> </body>
> </html>