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

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
aravin
Posts: 47
Joined: Mon Mar 09, 2015 7:43 am

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

Post by aravin » Fri May 08, 2015 6:37 am

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/
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Mon May 11, 2015 1:48 pm

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