Hi *,

I'm using WT and I need to append new test against Javascript menu.

I need to check for links in a webpage, this links are like :

<td width="100%" valign="middle">
    <a id="itemTextLink19" onclick="clickOnLink('19',
'/bo.php/log/index','_self');return false;" target="_self"
href="/bo.php/log/index">
         View logs
    </a>
</td>



So, I append to my script :

    <verifyXPath description='Verify ${rubrique}/${menu}'
xpath="contains( //a[contains(./text(),'View logs')]/text() , 'View
logs')" />


BUT this test always failed ;(
So, I ran XPE and Webtest Recorder to test this xpath. It's working
fine.


At this end, I append this line in my test (thx goes to Marc ! ;) ) :

<groovy>
    println step.context.currentResponse.asXml();
</groovy>               

And result is really surprising :

...
   [groovy]                         </td>
   [groovy]                         <td valign="middle" width="100%">
   [groovy]                           <a>
   [groovy]                             Testing
   [groovy]                           </a>
   [groovy]                         </td>
   [groovy]                       </tr>
   [groovy]                     </tbody>
...

Where is missing html 'A' tag attributes and content ? Bouh !!!! :-(
I check for sure about same user was used to login for webtest
recorder/xpe and webtest.sh.
I attach jpg (wt.jpg) about xpath result using webtest recorder.

I'm thinking about an issue with Javascript, because it seems some items
are missing but all tree nodes seems to be present (I'm talking about JS
for my menu).
I'm using Canoo R1724...

WebTest failed with this message :


Error

Message

xpath test: contains( //a[contains(./text(),'View logs')]/text() , 'View
logs') evaluates to false



Location

/www/st/engine/test/webtest/tests/bo/testBOMenu.xml (line: 161)


Does anybody got an idea about this ?

<<attachment: wt.jpg>>

Reply via email to