Running mutliple Row

Ranorex Studio, Spy, Recorder, and Driver.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Running mutliple Row

Post by omayer » Fri Apr 26, 2013 4:25 pm

I do have simpledata table with 10 rows and 2 columns, one column called 'activity' , how do I run below step 2 using data from all 10 rows, w/out splitting the testcase with another .cs file

i do only need to run step2 for 10 times,

Thank you in Advance

Code: Select all

 void ITestModule.Run()
        {
        		
            Mouse.DefaultMoveTime = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor = 1.0;

            	//Main Page
          		WebDocument webdoc ="/dom[@page='test.cfm']";
          		webdoc.EnsureVisible();

             	//step 1. Choose an existing orderID
           		GenericStaticClass.ClickOnSelectTag(webdoc.FindSingle(".//form[@name='Can']//select[@id='qs']",30000),"Can","CanID");
		
		
		//step 2. Add All activities 
   		
				
		     canPrPage.SelectActivityOne(activity); 

        }
        		
    }
}
Tipu

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Running mutliple Row

Post by Ciege » Fri Apr 26, 2013 8:44 pm

Add all the data from the 10 rows to an list, then add a foreach loop that loops the list and does your SelectActivityOne...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...