ah... sharp eyes! i missed this since this morning. its working fine now with capitalization.
Thanks a lot. Regards, Srini On Wed, Mar 24, 2010 at 4:43 PM, Jonathan Rosenberg <[email protected]>wrote: > Capitalization is wrong. It should be 'storeXPath.' > > > -- > Jonathan Rosenberg > Founder & Executive Director > Tabby's Place > http://www.tabbysplace.org > > -----Original Message----- > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *sriharini sriharini > *Sent:* Wednesday, March 24, 2010 4:37 PM > *To:* [email protected]; Dierk König > *Subject:* Re: [Webtest] identifying and storing xpath > > Hi, > I getting following error for storeXpath step. > Any suggestions? > > Thanks, > Srini > > error------------------------------- > > Caused by: h:\pf\webtest\csr\tests\jumpSearch\test.xml:16: Problem: failed > to create task or type storeXpath Cause: The name is undefined. Action: > Check the spelling. Action: Check that any custom tasks/types have been > declared. Action: Check that any <presetdef>/<macrodef> declarations have > taken place. at > org.apache.tools.ant.UnknownElement.getNotFoundException(UnknownElement.java:481) > at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:413) > at > org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:160) > at org.apache.tools.ant.Task.perform(Task.java:347) at > com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43) > at > com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31) > at com.canoo.webtest.steps.Step.execute(Step.java:103) > > test.xml file----------------------------------------- > > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE project SYSTEM "../../dtd/Project.dtd"> > <project default="csr"> > <target name="csr"> > <dataDriven > tableContainer="${test.data}/csrJumpSearch/csr_jump_search.xls"> > <webtest name="CSR Jump Search"> > &config; > <steps description="CSR Jump Search"> > &csrLogin1; > <followFrame name="topBar"/> > <setInputField name="searchDataBean.searchString" value="${account}"/> > <setSelectField name="searchDataBean.searchField" text="Account #"/> > <clickElement xpath="//i...@name='sa']"/> > <followFrame name="LookupLeft"/> > <storeXpath xpath="(//span[...@class='normalText'])[2]/text()" > property="account_number"/> > </steps> > </webtest> > </dataDriven> > </target> > </project> > ------------------------------------------------------------- > > > 2010/3/24 Dierk König <[email protected]> > >> the problem comes when referring to it later. >> (that is speculation of course since the referring part of the code is not >> submitted) >> >> cheers >> Dierk >> >> Am 24.03.2010 um 18:13 schrieb Marc Guillemot: >> >> > what is the problem with a blank? >> > >> > Marc. >> > -- >> > Blog: http://mguillem.wordpress.com >> > >> > >> > Dierk König wrote: >> >> you shouldn't have a blank in you property name. >> >> cheers >> >> dierk >> >> Am 24.03.2010 um 16:40 schrieb sriharini sriharini: >> >>> Thanks Mick. I get the xpath now for the second item. But the >> storeXpath is failing. Do i have to do any thing special? >> >>> >> >>> here is the step: >> >>> <storeXpath xpath="(//span[...@class='normalText'])[2]/text()" >> property="account id"/> >> >>> >> >>> >> >>> Thanks, >> >>> Srini >> >>> >> >>> >> >>> On Tue, Mar 23, 2010 at 5:02 PM, Mick Knutson >> >>> <[email protected]<mailto: >> [email protected]>> wrote: >> >>> >> >>> Try: >> >>> >> >>> String FIRST_ITEM_XPATH = "//sp...@class='normalText'][1]/text()" >> >>> >> >>> --- >> >>> Thank You… >> >>> >> >>> Mick Knutson, President >> >>> >> >>> BASE Logic, Inc. >> >>> Enterprise Architecture, Design, Mentoring & Agile Consulting >> >>> p. (866) BLiNC-411: (254-6241-1) >> >>> f. (415) 685-4233 >> >>> >> >>> Website: http://www.baselogic.com <http://www.baselogic.com/> >> >>> Linked IN: http://linkedin.com/in/mickknutson >> >>> Twitter: http://twitter.com/mickknutson >> >>> Vacation Rental: http://tahoe.baselogic.com >> >>> <http://tahoe.baselogic.com/> >> >>> --- >> >>> >> >>> >> >>> >> >>> >> >>> On Tue, Mar 23, 2010 at 1:43 PM, sriharini sriharini >> >>> <[email protected] <mailto:[email protected]>> wrote: >> >>> >> >>> >> >>> >> >>> Hi, >> >>> I am trying to get the xpath for 123456 and store it >> >>> Can you please help in writing the xpath and storing the value. >> >>> >> >>> Below is the code >> >>> >> >>> Thanks for the help. >> >>> >> >>> Regards >> >>> srini >> >>> >> >>> I tried this, but my test is failing for this step >> >>> <storeXpath xpath="(//sp...@class='normalText'])[2]/.." >> >>> property="confirm_id"/> >> >>> >> >>> >> >> ----------------------------------------------------------------------------------------------------------------------------- >> >>> <tr> >> >>> <td align="right"><span >> >>> class="boldText">Confirmation Number:</span></td> >> >>> <td><span >> >>> class="normalText">DE28-572145</span></td> >> >>> </tr> >> >>> <tr> >> >>> <td align="right"><span >> >>> class="boldText">Transaction Id#:</span></td> >> >>> <td><span >> >>> class="normalText">*123456*</span></td> >> >>> </tr> >> >>> >> >> ----------------------------------------------------------------------------------------------------------------------------------- >> >>> >> >>> >> >>> >> > >> > >> > >> > _______________________________________________ >> > WebTest mailing list >> > [email protected] >> > http://lists.canoo.com/mailman/listinfo/webtest >> >> _______________________________________________ >> WebTest mailing list >> [email protected] >> http://lists.canoo.com/mailman/listinfo/webtest >> > >

