Hi,
I've to test an application using Ranorex. When automating our application using Ranorex, I got a problem when detecting list item.
1.There is a test module to send messages from the client to server.After sending a message, client should receive response from the server if it is successfully delivered.
The request and response like this.It contains time (actual time),Msg size(static) and msg ID(Auto generated).
The put contains priority(static) as well
11:07:19.784:Server rec:100KB.Id:0c484a32-e2e23e-224234-2423423424
11:07:19.508:Put:100KB.Id:0c484a32-e2e23e-224234-2423423424. Prio:SYS
When playback, ranorex always look for the items which is recorded.But actually the ID is changed each and every time.
I want to make sure for each "put", receive a correct response from the server(Both IDs in "put" and "response" are same)
thanks
How to detect automatically generated list item ?
Re: How to detect automatically generated list item ?
If you post the XPath you are using we might be able to help you with the format and regular expressions.
What I would do is setup two repo objects, one for the put, one for the response, but use the same variable in each like this:
Response => /cell[@text~'Put:' + $MessageID]
Put => /cell[@text~'Server rec:' + $MessageID]
Then, you can do the PUT action in your test, save the id to the $MessageID variable and then validate that the Response object exists, given an appropriate timeout.
What I would do is setup two repo objects, one for the put, one for the response, but use the same variable in each like this:
Response => /cell[@text~'Put:' + $MessageID]
Put => /cell[@text~'Server rec:' + $MessageID]
Then, you can do the PUT action in your test, save the id to the $MessageID variable and then validate that the Response object exists, given an appropriate timeout.
Shortcuts usually aren't...
Re: How to detect automatically generated list item ?
Hi,krstcs wrote:If you post the XPath you are using we might be able to help you with the format and regular expressions.
What I would do is setup two repo objects, one for the put, one for the response, but use the same variable in each like this:
Response => /cell[@text~'Put:' + $MessageID]
Put => /cell[@text~'Server rec:' + $MessageID]
Then, you can do the PUT action in your test, save the id to the $MessageID variable and then validate that the Response object exists, given an appropriate timeout.
Please see attached screenshot.
Sorry for the late response.
thanks in advance
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to detect automatically generated list item ?
Hi flashmark,
Have you already tried what krstcs suggested?
A regular expression similar to the following one should work:
Regards,
Markus
Have you already tried what krstcs suggested?
A regular expression similar to the following one should work:
Code: Select all
Response => /listitem[@accessiblename~'Put:.*' + $MessageID]
Put => /listitem[@accessiblename~'Server rec:.*' + $MessageID]
Markus