Page 1 of 1

How to reduce the time while getting values from win forms?

Posted: Fri May 08, 2015 6:37 am
by aravin
Hi,

In my project, I am working on Fiddler (web debugging tool) to get input for my application.

Say for instance, I am getting values from fiddler as shown in the attached image.
forum2.PNG
we need to get all values such as v, _v, a, t and every single value from the fiddler (Fiddler-> Inspector -> webform).

But it takes hardly 3-5 min to get all the values . I need to reduce the time to retrive those values.

So we have more than 150 Testcases, it take 150x5 min = 750 min (around 12 hours)

Actuall code was, (FOREACH LOOP)

Code: Select all

public Dictionary<string, string> getEventsFromFiddler()
		{
			Dictionary<string, string> actual=new Dictionary<string, string>();
			for(int i=2;i<repo_fiddler.FrmViewer.GridBody.Children.Count-1;i++)
			{
				string inputKey=repo_fiddler.FrmViewer.GridBody.Children[i].Children[0].Element.GetAttributeValue("Text").ToString();
				string inputVal=repo_fiddler.FrmViewer.GridBody.Children[i].Children[1].Element.GetAttributeValue("Text").ToString();
				actual.Add(inputKey,inputVal);
				Report.Info(inputKey,inputKey);
			}
			return actual;
		}
Is there any other way to reduce time.? :(

You can download fiddler from here: http://fiddler2.com/

Re: How to reduce the time while getting values from win forms?

Posted: Mon May 11, 2015 1:48 pm
by Support Team
Hi aravin,

Could you please also send us a Ranorex snapshot of the Inspectors window?
Please also post the used RxPath of this repo item "GridBody".

By the way, why do you want to read the input for your application from fiddler and not from the "file" the input originally comes from?

The problem with your code is that you are searching for all the child elements of the grid many times.
Do the values change in your different test cases, or is the input the same for each test case?

Regards,
Markus