[Webtest] Yet another XPath Query...
Marc Guillemot
webtest@lists.canoo.com
Mon, 17 Oct 2005 12:55:23 +0200
Perhpas first provide the code of the smallest html page in which the
problem occur?
Have you taken into accout the fact that tbody are automatically added
between table and tr?
Marc.
Colin O'Brien wrote:
> Hi Marc,
>
> I have upgraded to 1.7_R1010 but webtest still does not resolve the XPath as
> expected... should I pass this on to the gang at jaxen.org...?
>
> Cheers,
> Colin.
>
>
> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Marc Guillemot
> Sent: 17 October 2005 08:23
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] Yet another XPath Query...
>
>
> Hi Colin,
>
> I would recommend first to upgrade to the latest build. The problem you
> have comes probably from Jaxen and I think that we've upgraded the
> version used since build 813.
>
> Marc.
>
> Colin O'Brien wrote:
>
>>Hi Marc,
>>
>>For the HTML below I'm using the following xpath to select the very last
>>cell which should evaluate to '0'
>>
>>//tr/td[span='GSMQoSRequested']/../../../../following-sibling::tr/td[2]/.
>>
>>The thing is that, it is evaluated as I expect in XPath Explorer but when
>
> I
>
>>put the same XPath into a storeXPath or verifyXPath step it evaluated to
>>null and my step fails... I'm running with 1.7_R813 at the moment, do I
>
> need
>
>>to upgrade to a later version for better XPath support...? Or is it
>>something I'm overlooking with the XPath syntax...?
>>
>>Regards,
>>Colin.
>>
>>
>
> ****************************************************************************
>
>>*
>>Error Message from canoo:
>>com.canoo.webtest.engine.StepFailedException: xpath test:
>>//tr/td[span='GSMQoSRequested']/../../../../following-sibling::tr/td[2]/.
>>evaluates to: , expected value is: 0, Step: VerifyXPath at
>>D:\canoo\modules\viewCDRDetailsVrfyBlobField.xml:18: with (stepid="Select
>>blob field QoSDelay = 0", text="0",
>>
>
> xpath="//tr/td[span='GSMQoSRequested']/../../../../following-sibling::tr/td[
>
>>2]/.", regex="false", stepType="verifyXPath")
>>
>
> ****************************************************************************
>
>>*
>>
>>
>
> ****************************************************************************
>
>>*
>>Full XPath Explorer XPath expression:
>>/descendant-or-self::node()/child::tr/child::td[(child::span =
>>
>
> "GSMQoSRequested")]/parent::node()/parent::node()/parent::node()/parent::nod
>
>>e()/following-sibling::tr/child::td[2.0]/self::node()
>>
>
> ****************************************************************************
>
>>*
>>
>>
>>
>
> ****************************************************************************
>
>>*
>><tr class="row1">
>><td align="left">
>><table border="0" cellspacing="0" cellpadding="0">
>><tr valign="middle" class="row1">
>> <td></td>
>> <td><img src="/roambroker/images/menu_bar.gif" alt="" border="0"></td>
>> <td><img src="/roambroker/images/menu_bar.gif" alt="" border="0"></td>
>> <td><img src="/roambroker/images/menu_blank.gif" alt=""
>
> border="0"></td>
>
>> <td><a href="GetCdrDetails.do?select=8566885&id=1&action=view"><img
>>src="/roambroker/images/menu_tee_minus.gif" alt="Close node" border="0"
>>
>>
>>></a></td>
>>
>> <td colspan="3"> <span
>>class="tree-control-unselected-left">GSMQoSRequested</span></td>
>> </tr>
>></table>
>></td>
>><td class="tree-control-unselected-left"></td>
>></tr>
>><tr class="row1">
>><td align="left">
>><table border="0" cellspacing="0" cellpadding="0">
>><tr valign="middle" class="row1">
>> <td></td>
>> <td><img src="/roambroker/images/menu_bar.gif" alt="" border="0"></td>
>> <td><img src="/roambroker/images/menu_bar.gif" alt="" border="0"></td>
>> <td><img src="/roambroker/images/menu_blank.gif" alt=""
>
> border="0"></td>
>
>> <td><img src="/roambroker/images/menu_bar.gif" alt="" border="0"></td>
>> <td><img src="/roambroker/images/menu_tee.gif" alt="" border="0"
>></td>
>> <td colspan="2"> <span
>>class="tree-control-unselected-left">QoSDelay</span></td>
>> </tr>
>></table>
>></td>
>><td class="tree-control-unselected-left">0</td>
>></tr>
>>
> ****************************************************************************
>
>>*
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>