"combo box" rows are not becoming visible

Class library usage, coding and language questions.
winnicki
Posts: 5
Joined: Wed Sep 14, 2011 5:54 pm

"combo box" rows are not becoming visible

Post by winnicki » Wed Sep 14, 2011 6:15 pm

Hi,

I understand that even if you're accessing something that is a combo box, it isn't necessarily a combo box type. I'm accessing each element within a combo box. The way the object is structured for the application I'm testing is such that the combo box is just a Container which contains Rows which contain only 1 Cell per Row. I have the appropriate paths for everything and have it in my repository etc. I'm reading each row (the Cell.Text of each Row) which works fine for the first page of rows in the combo box (the first 7 items)because they are visible. I then page down one page by clicking the space between the scroll bar and the line down arrow of the combo box. This should makes the next page of Rows visible but for some reason it doesn't even though it is visible on the screen and the rest of my for each loop which is supposed to retrieve the text from each Row's Cell.Text doesn't work. Here is the code. I know that containerMiscProjectsDefaultApp0 in fact has all the Rows from the combo box because I have viewed the details of the object while debugging.

A few things to consider may be..
1. The only way to get a path to the items in the combo box was to open the combox box and CTRL+WIN+L
on the first Row to get the path of the object that the Row is contained in.
Ranorex.Container containerMiscProjectsDefaultApp0  = MyRepository.containerMiscProjectsDefaultApp0;
Ranorex.Button btnPageUpMiscProjectsDefaultApp0 = MyRepository.btnPageUpMiscProjectsDefaultApp0;
Ranorex.Button btnPageDownMiscProjectsDefaultApp0 = MyRepository.btnPageDownMiscProjectsDefaultApp0;
Report.Info("Expected Result: Every item in Default Application is enabled");
			
while(btnPageUpMiscProjectsDefaultApp0.Visible)
     btnPageUpMiscProjectsDefaultApp0.Click();
foreach (Ranorex.Row row in containerMiscProjectsDefaultApp0.FindChildren<Ranorex.Row>())
     {
          if(!row.Visible) {
               btnPageDownMiscProjectsDefaultApp0.Click();
          }
     foreach (Ranorex.Cell cell in row.FindChildren<Ranorex.Cell>())
     {
          if (cell.Text == "Please select an Application...") 
               continue;
          //for (int tableRow = 0; tableRow < dsApps.Tables[0].Rows.Count; tableRow++) {
          //Validate.AreEqual(cell.Text, dsApps.Tables[0].Rows[tableRow].ItemArray[0]);
          Report.Info(cell.Text);
          //}
     }	
}

winnicki
Posts: 5
Joined: Wed Sep 14, 2011 5:54 pm

Re: "combo box" rows are not becoming visible

Post by winnicki » Wed Sep 14, 2011 6:17 pm

P.S I'm using Windows 7 Enterprise with Service Pack 1, Ranorex Version: 3.1.0.13946, and .NET Runtime Version 4.0. 30319.37

Thanks

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

Re: "combo box" rows are not becoming visible

Post by Support Team » Thu Sep 15, 2011 10:21 am

Hi,

I have tried to reproduce your issue on my machine, but in my case everything works as expected.
So can you send us some more information about your AUT (which technologies are used, ...) and a Ranorex Snapshot file of your application?

Regards,
Markus
Ranorex Support Team
.
Image