Hi,

did you check in the results what the "resulting page" for the invoke looks 
like?
I'm not too savvy about the "normalize-space" you are using, but I think you 
might know why you are using it. :)

Also, it may be worth checking the live page with e.g. Firefox and the XPather 
addon (or with XPath-Explorer) to see if there is anything that you missed on.

HTH,
Thomas

Thomas Klein
Senior Associate QA | SapientNitro

________________________________
From: [email protected] [mailto:[email protected]] On 
Behalf Of Gert Pauwels
Sent: Monday, March 01, 2010 11:47 AM
To: [email protected]
Subject: [Webtest] Finding correct xpath

Hi,

I'm struggling to find the correct xpath for a tag in my html file:


        <table cellspacing="0" cellpadding="5" border="0" width="100%">
        <tr>
                <td  colspan="1" rowspan="1" valign="top">
                        <ul class="tabs">
                                <li class="on"><a onClick="cursorWait();" 
href="screen/view.do?screenId=8812&sectionId=21389&wizardExecuted=null<view-source:http://celestis:9030/norkom/screen/view.do?screenId=8812&sectionId=21389&wizardExecuted=null>">Filter</a></li>
                                                </ul>
                                                <div class="tabArea" 
style="width: auto; padding: 6px;">
                                                        <div class="row">


I have tried several xpaths, and none of them come back with the correct result:

xpath="normalize-space(table[1]/tr[1]/td[1]/u...@class='tabs']/l...@class='on']/a)"
 text="Filter"/>

xpath="normalize-space(table[1]/tr[1]/td[1]/u...@class='tabs']/l...@class='on']/a='Filter')"
 text="Filter"/>

xpath="normalize-space(/body/table[1]/tr[1]/td[1]/u...@class='tabs']/l...@class='on']/a)"
 text="Filter"/>

The webtest always fails...

Gert

________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection. Sign up 
now.<https://signup.live.com/signup.aspx?id=60969>

Reply via email to