How to write the ordee# validated to the report file

Ranorex Spy, Recorder, and Studio.
vdoddaguni
Posts: 11
Joined: Mon Apr 11, 2011 9:34 pm

How to write the ordee# validated to the report file

Post by vdoddaguni » Thu Jul 28, 2011 5:00 pm

Hi,

I am placing an order from our website. Once I get the order confirmation number, I am validating it during the recording. However, I want to write the value that was validated to the report. log file. In this way, we have the order numbers in the log file.

How can this be accomplished? Please let me know...

Thanks

div[2]/p[@innertext='Your confirmation # is ']/strong/span[@id='ctl00_Content_OrderNumberLabel']

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to write the ordee# validated to the report file

Post by Support Team » Thu Jul 28, 2011 5:16 pm

Please, read the API documentation of the "message" parameter of the Validate method you are using (e.g. for Validate.Attribute). The "message" parameter supports placeholders that are replaced by the actual value of the validated attribute.

Regards,
Alex
Ranorex Team
.
Image

vdoddaguni
Posts: 11
Joined: Mon Apr 11, 2011 9:34 pm

Re: How to write the ordee# validated to the report file

Post by vdoddaguni » Fri Jul 29, 2011 8:24 pm

Hi,

I am new to Ranorex and do not have much programming background. If you can give me a code snippet that I can use it will be very beneficial.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to write the ordee# validated to the report file

Post by Support Team » Mon Aug 01, 2011 2:47 pm

Hi,

If you want to customize the message of the Validate, please use following code:
Validate.Attribute(repo.AppFolder.RepoItemInfo, "Text", "match", "YourTextHere");
If you are new at Ranorex and want to write code, I would suggest you to read following user guide entry.
http://www.ranorex.com/support/user-gui ... dules.html

Regards,
Peter
Ranorex Team
.
Image