Open records based on corresponding column values

Ranorex Spy, Recorder, and Studio.
varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Open records based on corresponding column values

Post by varun » Thu Sep 06, 2012 11:03 am

Hi Support,

In our Desktop application, I filter records from drop-down.
What I want is,
1. In Resulted records tool automatically clicks on magnify icon for the record in which Dep Dt = dd/mm/yyyy (I will mention different dates manually in excel).
2. In Resulted records, tool automatically click on "Notes" link of record for which Dep Dt = dd/mm/yyyy.
3. If records are appearing in multiple pages, and required record is not on first page then how RX tool can access related record?

Please provide me solutions for all of above cases.
You can also fine attached snapshot to get the overview.

WR,
Varun.
Attachments
CaseList20120906.png
CaseList20120906.png (113.71 KiB) Viewed 1240 times

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Open records based on corresponding column values

Post by varun » Fri Sep 07, 2012 8:59 am

Hi Support,

Waiting for your Feedback, as it's Urgent to get its solution !!!

To achieve problem mentioned in Step 1 & 2, I record process of 'Click on Magnify icon' in separate Test Case and then bind excel having values for "Dep Dt" with related Test Case. But in this case, new problem is How I can link these two Test Cases with each other? Is there any other method to achieve this? If so please let me know.

Please provide solution in details. Also , provide solution for Step 3.

Thanks,
Varun.

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

Re: Open records based on corresponding column values

Post by Support Team » Sat Sep 08, 2012 10:44 am

Hello Varun,

to provide a solution for your problem, it would be helpful to get access to your application or some Ranorex Snapshots. To get more information how to create Ranorex Snapshots please read the section Creating Ranorex Snapshot Files in our user guide.
Would you please exactly describe what you want to do?
If records are appearing in multiple pages, and required record is not on first page then how RX tool can access related record?
On which sites is the required record?
Thank you!

Regards,
Bernhard
Ranorex Support Team
.
Image

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Open records based on corresponding column values

Post by varun » Mon Sep 10, 2012 6:11 am

Hi Bernhard,

What I want is,
1. To open record from the provided screen snapshot, based on Composite key (values of rows- City Pair, Dep, Dep Dt, DOW & DLft). Record can be opened by click on magnifier icon link available in very first column. I recorded the first step at my own. But here my question is for next scenarios, how we can drive RX Tool to open other records based on Composite Key, i.e. for example -> Click on magnify icon of record for which City Pair is PLZELS, Dep is 8488, Dep Dt is 04/11/2012, DOW is Wed & DLft is 1.

2. In screenshot, you can also see some filter drop-downs(City Pair, Departure & Date). If I filter any record and resulted records are in high count say 200 which will appear in multiple pages. In such case, how RX can fetch related record from multiple pages and open record as mentioned in Step 1.

We have to fetch records form our application which is Desktop based. Sorry, I am providing you again with the rough snapshot as RX snapshot size is more than 2.20MB which is validated in your Support Forums page.
Please provide us with the solution ASAP.

WR,
Varun.
Attachments
WB_CL20120910.png
WB_CL
WB_CL20120910.png (128.28 KiB) Viewed 1208 times

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Open records based on corresponding column values

Post by varun » Mon Sep 10, 2012 11:37 am

Hello Bernhard,

Also let me know, if there any other way to get instant support for our problems as yet we are not aware of RX Tool and we want solution immediately.

Waiting for solutions for my Queries!

Thanks,
Varun.

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

Re: Open records based on corresponding column values

Post by Support Team » Mon Sep 10, 2012 6:25 pm

Hello Varun,

First of all you have to know the 'Composite Key' for each record you want to click. As you said you have to use a Data Source for Data-Driven Testing. Depend on this value you can either click the associated magnifier icon by setting the value of the repository variables or you use the user code to find the right element for this record.
To go to the next page I recommend to make a recording where you click on the 'next site' button and place this recording at the end of the test case.

I hope I could help!

Regards,
Bernhard
Ranorex Support Team
.
Image

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Open records based on corresponding column values

Post by varun » Tue Sep 11, 2012 5:47 am

Hi Bernhard,

First of all, many thanks for providing the RX links.

1. As discussed earlier also, Composite Key is on columns "City Pair, Dep, Dep Dt, DOW & DLft". Could you please let me know in steps, how I can achieve solution for my first problem ?

2. And for second problem, If I do recording of click on the 'next site' button then how can I drive RX to click on next page link only in case when result is not on current opened page ?

3. Also Mr. Bernhard, please let me know the another way to get instant support for our problems as currently I am getting solutions after 24 Hrs, leaving me behind schedule.

Thanks & Regards,
Varun.

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

Re: Open records based on corresponding column values

Post by Support Team » Wed Sep 12, 2012 7:42 am

Hello Varun,

As i said, it is hard to provide a solution for you without having a snapshot to know how your elements look like, but i try to help you with the following code snippets.
1. As discussed earlier also, Composite Key is on columns "City Pair, Dep, Dep Dt, DOW & DLft". Could you please let me know in steps, how I can achieve solution for my first problem ?
First of all you should search the root of the element where the records are listed and save it into a IList, e.g.
Table pathToYourRecordList = "path/to/your/record/list";
IList<Row> FoundItems = pathToYourRecordList.FindDescendants<Row>();
Iterate through this list and check if the value of the specified element contains the value you got from the data table for the actual iteration.
bool itemWasFound = false;		
IList<Row> FoundItems = pathToYourRecordList.FindDescendants<Row>();
foreach(Row rowItem in FoundItems)
{
	foreach(Cell cellItem in rowItem.Cells)
	{
		if(cellItem.ToString().Equals("City Pair") || cellItem.ToString().Equals("Dep") || ...)
		{
			if(cellItem.Text.Equals(valueCityPair) || cellItem.Text.Equals(valueDep) || ...)
			{
				itemWasFound = true;
                break;
			}
		}
	}
}
If the item was found you can click the magnifier icon.
if(itemWasFound)
{
	Mouse.MoveTo(magnifierIcon);
	Mouse.Click(magnifierIcon);
}
If no item was found on the current page you have to click on the next Page button and repeat the steps above.
if(!itemWasFound)
{
	nextPageButton.EnsureVisible();
	Mouse.Click(nextPageButton);
}
Also Mr. Bernhard, please let me know the another way to get instant support for our problems as currently I am getting solutions after 24 Hrs, leaving me behind schedule.
Unfortunately Ranorex doesn't have instant support. We strive to help our customers to find a solution for the problems, but to make it easier it would be helpful to get at least a Ranorex Snapshot, access to the AUT or a sample project.

I hope i could help you!

Regards,
Bernhard
Ranorex Support Team
.
Image