Forum Discussion

dsolis2's avatar
Occasional Contributor
15 years ago

How to move up or down on web page

I'm testing a flex application. TC only sees objects that are visible on the screen. However, I have a page that when maximized to fit the screen only displays the upper portion of the page. To get to the rest of the content, I need to use the scrollbar to view the rest of the page. I have two questions.

1. Is there a method other than drag to move down the page to make the second half visible?

2. Once I'm on the bottom portion of the page, the objects take the same name as they did on top. For example, this particular page has many checkboxes. Imagine a questionare with 100 questions each with a checkbox next to it. The first 50 are visible in the object browser as CheckBox(9),CheckBox(8),CheckBox(7)... and so on. When I scroll down to the bottom 50, the checkboxes take on the same name as the one's on the top. At this point, the object browser see's the checkboxes on the bottom 50 as CheckBox(9),CheckBox(8),CheckBox(7)... The question is, once I get the bottom portion, how do I identify the objects different from the top. Obviously either on the top or bottom, I should be able to click on the checkbox regardless of the name. But my problem is that I will use a giant case structure to select a specific checkbox I want to test.

Select Case Checkbox

       Case "1"          


       Case "2" 


       Case "3"


  End Select

The problem here is when I get to the bottom 50, the names will be the same. Any ideas?

3 Replies

  • Hi David,

    Is your application compiled as Open with the FlexClient.swc library as it is described in the Preparing Flex Applications for Testing help topic? If it is not, I recommend that you consider doing this as this will make TestComplete identify objects in your application in a more convenient manner.

    If you cannot recompile the application with TestComplete's library to enable the Automation API, I would appreciate it if you provided us with access to the tested application so we can investigate this behavior and help you find a solution. You can send us all of the needed details directly via the Contact Support form. 
  • dsolis2's avatar
    Occasional Contributor

    The application is not compiled using Adobe's automation API's. The reason for this is because we are using dynamic libraries for the flex app to reduce the footprint and improve performance. Instead, we are using MSAA to access the objects in the application. Using TC in this configuration reduces the accessibility to the objects, but we have successfully been able to automate most of the applicaiton. I believe the question I have would also be a problem even if we did use the automation API's. I have attached 2 screenshots.

    The screen has 60 + checkboxes. Each one has to be checked or unchecked. Checkboxes can easily be manipulated when visible to TC. When maximizing the browser, the first half shows. This half is visible to TC. The second half you need to somehow get down to make it visible for TC to recognize the rest of the checkboxes. You could use the drag method and use the scrollbar to get to the bottom half of the page.

    Is there a method that is available that will be like something similar to page down or page up keys to make the bottom half visible?

  • Hi David,

    We created a sample application and reproduced this behavior. As we have found, separate check box objects can be identified by the 'ObjectIdentifier' or 'Caption' properties which contain objects' text. You can map objects by these properties or use the Find method in your script tests to find these objects without relying to indexes.

    Please let me know if this information helps.