This is untested but I think it will get you the entire text of the <b>
element.

 

                //table//td/B[starts-with(text(), "*Account created
successfully: Account ID"]/text()

 

Xpath 1.0 has no regular expressions, if I recall, so you can then use
Ant-contrib regex function to extract the digits you want.  Or you could use
the substring Xpath expression to extract the digits, as long as they're
always in a fixed position.

 

--
Jonathan Rosenberg
Founder & Executive Director, Tabby's Place
http://www.tabbysplace.org/

 

 

 

From: [email protected] [mailto:[email protected]]
On Behalf Of sriharini sriharini
Sent: Friday, February 26, 2010 3:27 PM
To: [email protected]; Soula, William
Subject: Re: [Webtest] store server returned value

 

Hi,

 

The application i am testing is in frames. top frame for navigation, right
right frame for menu and left frame is the main frame where all the pages
are seen.

i am using mozilla webtest recorder to get my xpath. 

when i try to open the frame in new window to get my xpath, the application
is logging off. There is no way i can get it now.

 

Can any one help me in figuring xpath element from the code below.

 

I am interested in capturing the 1234567 number so that i can use it in my
next ant call target.

 

               <table cellpadding="0" cellspacing="0" border="0"
width="800px;" style="padding-left: 5px;">
               <tr>
                 <td style="padding-top: 10px;padding-bottom: 20px;">
                       <b>*Account created successfully: Account ID
1236547</b>
                </td>
               </tr>
               </table>

 

Thanks in advance

 

Regards,

Sri

 

 

 
 
 

 

 

 

 

 

 

On Fri, Feb 26, 2010 at 10:07 AM, Soula, William <[email protected]>
wrote:

Look at <storeProperty/> or <storeXPath/>

http://webtest.canoo.com/webtest/manual/storeProperty.html
http://webtest.canoo.com/webtest/manual/storeXPath.html

  _____  

 
Hi,
I am trying to store a server returned value. Can some guide me how to do
this? A sample script is appreciated.

Test Scenario: user enrolles to site and at the end he gets his account
number. i need to capture this account number and store it as property or to
an excel sheet.

Thanks for you help

Regards
sri

 

Reply via email to