Hi Gert,

By utilizing the verifyXPath step, you can achieve both of your use cases.  It 
can become a bit more complex as a result, and adding ids, classes, spans, and 
other html tricks, you can leverage the power of XPath without it becoming too 
hard to follow and maintain.

Given your screenshot, here's some example html which would represent an 
equivalent layout along with the validation steps.

HTML:

<table>
    <tr>
        <td>Assigned to:</td>
        <td>admin lastname</td>
        <td>Domain:</td>
        <td>AML</td>
    </tr>
    <tr>
        <td>Assigned by:</td>
        <td>admin lastname</td>
        </td>Status:</td>
        <td>Assigned</td>
    </tr>
</table>
<div id="eulist">
    <p>Check on EU List <span class="alert">Alert</span></p>
</div>

Verification:

<verifyXPath description="Verify the item is Assigned To admin lastname" 
xpath="//tr[./td[1]="Assigned to:"]/td[2]" value="admin lastname" />
<verifyXPath description="Verify the item is Assigned By admin lastname" 
xpath="//tr[./td[1]="Assigned by:"]/td[2]" value="admin lastname" />

If you want to strip out spaces, you can utilize the normalize-space function:

<verifyXPath description="Verify EU List status" 
xpath="normalize-space(id('eulist'))" value="Check on EU List Alert" />

More information on XPath can be found here:

 *   W3C XML Path Language (XPath) Documentation<http://www.w3.org/TR/xpath>
 *   W3 Schools XPath Tutorial<http://www.w3schools.com/xpath/>

Hopefully this helps.

Cheers,

John Spann

Software Engineer
Citrix Online | 6500 Hollister Avenue | Goleta, CA 93117
T: +1 805 690 3489 | M: +1 805 729 0008
[email protected]<x-msg://29/[email protected]>
http://www.citrixonline.com<http://www.citrixonline.com/>

[cid:[email protected]]


Access Your PC From Anywhere: www.gotomypc.com<http://www.gotomypc.com/>
Online Meetings Made Easy: www.gotomeeting.com<http://www.gotomeeting.com/>
Remote Support Made Easy: www.gotoassist.com<http://www.gotoassist.com/>
Webinars Made Easy: www.gotowebinar.com<http://www.gotowebinar.com/>




On Feb 18, 2010, at 8:06 AM, Gert Pauwels wrote:

Hi,

We have been using Canoo for quite some time now, and are always looking to 
extend its use. I have two issues I'd like to discuss:

1 verifying text for its exact location on the screen
2 verifying texts that on screen are displayed next to each other (but source 
page contains tabs etc.)

1 Verifying text and exact location

Our webpage is divided into several sections. Each section contains a number of 
fields in any number of rows and columns. Let's look at one field. If for 
instance Customer ID is on my screen, it will have specific location (row 0 = 
top row, column 0 = left most column). I can verify that the field is present 
alright, but I would like to find a way to determine its exact location. If my 
field is in row 2, column 1 then I need to be able to that in Canoo. The 
question is how? (I've attached a screenshot)
Example:

first column caption: Assigned to
first colunm value for that field: Richard Branson

second column caption, row 3: Branch Name
value for this field: Tokyo Branch

How do I make Canoo know that the value Tokyo Branch is the value for Branch 
Name, and not for the Assigned to field?

2 Verifying text next to each other
I need to find a way to determine whether for the text on the left hand side of 
the screen the text on the right hand side of the screen matches a given value. 
Looking at the source of the webpage, I cannot find any hooks to tie myself 
onto for this. An example:

Check on EU List (some spaces, tabs or whatever later, invisible to the user) 
Alert
Check on OFAC list (some spaces, tabs or whatever later, invisible to the user) 
Pass

When running Canoo, I need to be sure that when I verifyText 'Alert' this is 
for the value 'Check on EU List' and not for any other text that may appear on 
the same page.
If possible, how?

Thanks for your assistance

Gert Pauwels

________________________________
Hotmail: Free, trusted and rich email service. Get it 
now.<https://signup.live.com/signup.aspx?id=60969> <sectionImage.jpg>

<<inline: image001.png>>

Reply via email to