Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3691680
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:10:30+00:00 2026-05-19T04:10:30+00:00

I have an AdvancedDataGrid that loads data from a web service. It only loads

  • 0

I have an AdvancedDataGrid that loads data from a web service. It only loads the top level stuff and then as you click the arrows it gets that data.

All I want to do is to find out if some text is in one of the cells. I originally did this:

public static function assertTextInAdg(params:Object):Boolean{
    // Gets the ADG
    trace('youre in the assertTextInAdg function');
    var grid:* = FPLocator.lookupDisplayObject(params);
    trace('var grid:* = FPLocator.lookupDisplayObject(params): ' + grid);
    // Convert ADG to automation delegate to get an array of column names
    var newGrid:* = new AdvancedDataGridAutomationImpl(grid);
    trace('var newGrid:* = new AdvancedDataGridAutomationImpl(grid): ' + newGrid);
    var datas:AdvancedDataGridTabularData = newGrid.automationTabularData as AdvancedDataGridTabularData;
    trace('var datas:AdvancedDataGridTabularData = newGrid.automationTabularData as AdvancedDataGridTabularData: ' + datas);
    var columnId:Array = datas.columnNames as Array;
    trace('var columnId:Array = datas.columnNames as Array: ' + columnId);
    // Convert ADG data to an array of rows
    var gridView:HierarchicalCollectionView = grid.dataProvider as HierarchicalCollectionView;
    trace('var gridView:HierarchicalCollectionView = grid.dataProvider as HierarchicalCollectionView: ' + gridView);
    var gridData:HierarchicalData = gridView.source as HierarchicalData;
    trace('var gridData:HierarchicalData = gridView.source as HierarchicalData: ' + gridData);
    var gridArrayColl:ArrayCollection = gridData.source as ArrayCollection;
    trace('var gridArrayColl:ArrayCollection = gridData.source as ArrayCollection: ' + gridArrayColl);
    var gridArray:Array = gridArrayColl.source as Array;
    trace('var gridArray:Array = gridArrayColl.source as Array: ' + gridArray);
    var validator:String = params.validator;
    trace('var gridArray:Array = gridArrayColl.source as Array: ' + validator);

    for (var i:int = 0; i < gridArray.length; i++) {
        for (var j:int = 0; j < columnId.length; j++) {
            if (gridArray[i][columnId[j]] == validator) { return true; }
        }
    }

    throw new Error("Validator not found in ADG.");

}

This works if the data is provided from the code, but now I am trying the same thing with the data being provided from a server and the traces come out like this:

youre in the assertTextInAdg function
var grid:* = FPLocator.lookupDisplayObject(params):           companyDashboard.dashboardCanvas.dashboardGrid
var newGrid:* = new AdvancedDataGridAutomationImpl(grid): [object AdvancedDataGridAutomationImpl]
var datas:AdvancedDataGridTabularData = newGrid.automationTabularData as AdvancedDataGridTabularData: [object AdvancedDataGridTabularData]
var columnId:Array = datas.columnNames as Array: @objectName,@customObjectType,@owner,@value0,@value1,@icon1,@value2,@icon2,@value3,@icon3,@value4,@icon4,@value5,@value6,@icon6,empty
var gridView:HierarchicalCollectionView = grid.dataProvider as HierarchicalCollectionView: [object HierarchicalCollectionView]
var gridData:HierarchicalData = gridView.source as HierarchicalData: [object HierarchicalData]
var gridArrayColl:ArrayCollection = gridData.source as ArrayCollection: null

And then it fails, because it can’t get the source, I think. I am completely open to other strategies and I have been stuck on this problem for 10 days now. This seems like it would be relatively easy. Thanks in advance for any input.

** UPDATE **

I have been going down a slightly different route. I am now trying to iterate through the HierarchicalCollectionView with a cursor. This seems to work. But, when I get the node I can’t do anything useful with it… I have been looking for examples but so far they all stop at the point of getting the node. Which means this is a stupid question I know.

 public static function assertTextInAdg(params:Object):Boolean{
    // Gets the ADG
    trace('youre in the assertTextInAdg function');
    var grid:* = FPLocator.lookupDisplayObject(params);
    trace('var grid:* = FPLocator.lookupDisplayObject(params): ' + grid);
    var adgData:* = grid.hierarchicalCollectionView;
    trace('var adgData:* = grid.hierarchicalCollectionView: ' + adgData);
    trace('AdgData.length() = ' + adgData.length);
    var cursor:* = adgData.createCursor();
    while(!cursor.afterLast) {
        var node:Object = cursor.current;
        cursor.moveNext();
 }

This is the trace() output:

youre in the assertTextInAdg function
var grid:* = FPLocator.lookupDisplayObject(params):     testApp.ApplicationSkin2._ApplicationSkin_Group1.contentGroup.Panel5.myADG
var adgData:* = grid.hierarchicalCollectionView: [object HierarchicalCollectionView]
AdgData.length() = 8
node.getData: undefined
constructor: [class Object]
hasRoot: undefined
length: undefined
openNodes: undefined
prototype: undefined
showRoot: undefined
source: undefined
node.getData: undefined
constructor: [class Object]
hasRoot: undefined
length: undefined
openNodes: undefined
prototype: undefined
showRoot: undefined
source: undefined
node.getData: undefined
constructor: [class Object]
hasRoot: undefined
length: undefined
openNodes: undefined
prototype: undefined
showRoot: undefined
source: undefined
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:10:31+00:00Added an answer on May 19, 2026 at 4:10 am

    Using selenium and FlexPilot this is how I am checking for a text in a grid

    selenium.flexAssertProperty("id=MyAppInFlex", "chain=id:userGrid/name:AdvancedListBaseContentHolder*/name:AdvancedListBaseContentHolder*, validator=text|Maria Marcano");
    

    I have some blog post with information about Selenium and FlexPilot
    – http://mariangemarcano.blogspot.com/2010/08/selenium-testing-with-flex-pilot.html
    – http://mariangemarcano.blogspot.com/2010/10/automating-myappinflexswf-useful.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an AdvancedDataGrid with a GroupingCollection and a SummaryRow. How do I display
Have a n-tire web application and search often times out after 30 secs. How
I have an AdvancedDataGrid with a HierarchicalCollectionView as its dataProvider. When I view the
* Newbie Alert * I have an AdvancedDataGrid with 5 columns. The second column,
i have a grouped AdvancedDatagrid. It looks like... dataProvider - GroupingCollection2 - Grouping -
Have an app that can use tts to read text messages. It can also
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.