Hi folks,

none of my business but the font color should be defined using CSS to
make the test more robust ... ;-)

Cheers,

Siegfried Goeschl


Gert Pauwels wrote:
> John,
> great! Works like a charm!
> Thanks
>  
> > From: [email protected]
> > To: [email protected]; [email protected]
> > Subject: Re: [Webtest] Verifying texts at exact location on screen
> > Date: Fri, 19 Feb 2010 02:35:33 -0800
> >
> > Hi Gert,
> >
> > You're so very close. Try the following:
> >
> > <verifyXPath description="Check raises an alert 2"
> xpath="normalize-space(//tr[./td[1]/child::a='Wholename Retail on OFAC
> list']/td[2]/fo...@color='#FF0000'])" text="Alert"/>
> >
> > Sorry, before I had incorrectly used "value" when it should have
> been "text".
> >
> > 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 19, 2010, at 2:26 AM, Gert Pauwels wrote:
> >
> > Hi all,
> >
> > apparently this one works:
> >
> > <verifyXPath description="Check raises an alert 2"
> xpath="//tr[./td[1]/child::a='Wholename Retail on OFAC
> list']/td[2]/fo...@color='#FF0000']"/>
> >
> > So it's just selecting the text value that is the tricky bit!
> >
> > Gert
> >
> > ________________________________
> > From: [email protected]<mailto:[email protected]>
> > To: [email protected]<mailto:[email protected]>
> > Subject: RE: [Webtest] Verifying texts at exact location on screen
> > Date: Fri, 19 Feb 2010 11:14:57 +0100
> >
> > Hi John,
> > thank you for your help with this.
> > I am trying out my second issue first, namely the 'Wholename on OFAC
> list' issue. I have come up with this so far:
> >
> > <verifyXPath description="Check raises an alert 2"
> xpath="//tr[./td[1]/child::a='Wholename Retail on OFAC list']"/>
> >
> > This actually passes the test: using the xpath I can find the
> element a that matches the text specified. The second part of my test
> is a bit trickier it seems. I can't seem to find the second <td> in
> which there is an element <font> that has the value 'Alert'.
> >
> > I tried the following:
> >
> > <verifyXPath description="Check raises an alert 2"
> xpath="//tr[./td[1]/child::a='Wholename Retail on OFAC
> list']/td[2]/font=normalize-space('Alert')"/>
> >
> > The test comes back with an error message:
> >
> > xpath test: //tr[./td[1]/child::a='Wholename Retail on OFAC
> list']/td[2]/font=normalize-space('Alert') evaluates to false
> >
> > I also tried without normalize-space, to no avail. I also move the
> second part before the closing square bracket, but no success either.
> >
> > I will continue trying of course, but if you have any ideas, don't
> hesitate!
> >
> > Thank you
> >
> > Gert
> >
> > P.S. I attach a sample source code.
> >
> >
> > ________________________________
> > From: [email protected]<mailto:[email protected]>
> > To: [email protected]<mailto:[email protected]>
> > Subject: Re: [Webtest] Verifying texts at exact location on screen
> > Date: Thu, 18 Feb 2010 14:42:11 -0600
> >
> > What about xpath?
> >
> > For 1 you can use a pretty restrictive xpath to verify the location
> in the dom, in your example
> //tab...@id='tableCustomerData']/tr[1]/td[1].<mailto:tab...@id='tableCustomerData']/tr[1]/td[1].>
> You could store that xpath and then verify the property or get fancier
> with the xpath to do the verification within the xpath
> >
> > For 2 you could use following:sibling if your data is in a table.
> //tab...@id='tableCustomerData']/tr/td[contains(.,'yourCustomerId)]/following-sibling::*<mailto:tab...@id='tableCustomerData']/tr/td[contains(.,'yourCustomerId)]/following-sibling::*>
> Again you could store the xpath and verify the property or possibly
> get fancy with xpath to do it for you.
> >
> > Hope this helps, I think xpath might be the solution you are looking
> for do a google search for xpath tutorial and go through the
> w3cschools tutorial if you don't know about xpath.
> http://www.w3schools.com/xpath/
> >
> > ________________________________
> >
> >
> > I guess you could do all that with scriptStep and some JS scripting:
> > http://webtest.canoo.com/webtest/manual/scriptStep.html
> >
> > I might be wrong though, I am still a newbie at this - others might
> provide
> > more insight.
> >
> > Enjoy!
> >
> >
> > On Thursday 18 February 2010, 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.
> > > https://signup.live.com/signup.aspx?id=60969
> > >
> >
> > _______________________________________________
> > WebTest mailing list
> > [email protected]<mailto:[email protected]>
> > http://lists.canoo.com/mailman/listinfo/webtest
> > ________________________________
> > Hotmail: Free, trusted and rich email service. Get it
> now.<https://signup.live.com/signup.aspx?id=60969>
> > ________________________________
> > Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign
> up now.<https://signup.live.com/signup.aspx?id=60969>
> >
>
> ------------------------------------------------------------------------
> Hotmail: Trusted email with powerful SPAM protection. Sign up now.
> <https://signup.live.com/signup.aspx?id=60969>
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to