Telerik RAD Contorls

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Nadeem
Posts: 10
Joined: Fri Jul 01, 2011 9:26 am

Telerik RAD Contorls

Post by Nadeem » Fri Nov 04, 2011 12:12 pm

Hi to one and all,

System Details - Win XP SP 3
Ranorex - 3.1.1
IE - 8.0.6001.18702
Firefox - 7.0.1

I have a question in regards to the Telerik RAD Controls in ASP.Net. Am using Ranorex 3.1.1 and running a script whereby it:

. Clicks on a Drop Down menu
. Selects a specified value from an Excel (DataSource) spreadsheet.

Now at Runtime (not through Studio but by Command Line and Ranorex Test Suite Runner) it is identifying the drop down list, it clicks on it, but then it seems to not wait for the list to populate. Instead it clicks on the Drop down list, and then moves onto the next step in the script. Since it does not wait for the list to populate; the script fails. Simply because the next step is dependant on the value being inserted in the previous step.

All the other Telerik Controls it has not problems with and works fine. But this behaviour is consistent in every script which includes selecting a value from a drop down list. It just does not wait the the list to populate. I know i can insert a delay or increase the time it takes for the step to execute in order for the list to popuate ..... but was just wondering if anyone else is aware of this issue or is the Ranorex Team aware of this issue?

Regards
Nadeem
Attachments
Drop Down List.JPG
Drop Down List.JPG (12.75 KiB) Viewed 1541 times

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

Re: Telerik RAD Contorls

Post by Support Team » Fri Nov 04, 2011 1:25 pm

Hi,

Do you have tried to add a validation step to ensure that the drop down menu is visible?
If not please add the Validation(Exists) action prior to the Click action.
If this does not solve your problem you can also use something like this:
YourElement yEl = repo.YourPreviousElement.FindSingle("./yourElement[@yourAttribute='"+yourVariable+"']");
yEl .Selected= true;
Regards,
Markus
Ranorex Support Team
.
Image

Nadeem
Posts: 10
Joined: Fri Jul 01, 2011 9:26 am

Re: Telerik RAD Contorls

Post by Nadeem » Fri Nov 04, 2011 2:59 pm

I suppose i can add in a validation of some sort or even insert a delay. That is a work around.

But i was more interested in why, during Runtime, Ranorex steps through a bit too quick for its own good. It doesn't wait for the list to populate. In terms of the drop down being visible or even existing, that works fine beause i am performing the click Action on it anyway. And that action works fine.

Out of 18 runs where the drop down list is used, it failed 12 times.

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: Telerik RAD Contorls

Post by omayer » Fri Nov 04, 2011 8:17 pm

I had similar situatin - below code worked for me --

Code: Select all

   public void SelectActivityThree(string _activityThree)
   
         	{
        	
    		bool found = false;
        	WebDocument webDocument = "/dom[@caption='asdfasdfsdf']";    	
                   	
        	        	
        	Ranorex.SelectTag findActivityList; 			
	found = webDocument.TryFindSingle(".//select[@id='categoryID']", 10000, out findActivityList);

				if (!found)  
				{  
	throw new Ranorex.ElementNotFoundException("Activity list was not found", null);                  
				} 
				
				else
				{
	         
				findActivityList.Click(Location.CenterRight); 
				// find the right item in the list and click it
	ListItem item = "/container[@caption='selectbox']/listitem[@text='"+_activityThree+"']";
				item.Click();
		Report.Success("Select Activity: " + _activityThree);
		
				}
          }    
Tipu