cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get 'Advanced View' Object Fields?

Contributor

How to Get 'Advanced View' Object Fields?

I'm using the following to get the object fields for a mapped object:

 

aqObject.GetFields(Aliases.Obj, true)

 

I'm returned 0 fields found for an object that definitely has fields.  My only guess is that the GetFields method only returns the basic view fields (which the object does not have any) and does not return the advanced view fields.  Is there a way to return the object's advanced view fields?

5 REPLIES 5
Community Hero

Re: How to Get 'Advanced View' Object Fields?

There is a difference between "Fields" and "Properties".  Can you post a screenshot of the Object Spy of the object you're working with that is not returning fields?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: How to Get 'Advanced View' Object Fields?

Hi Robert,

 

    Unfortunately, I can't post a screenshot.  However, when looking at the Object Spy for this object, the Fields tab is present and populated with numerous Private and Protected Fields (in Advanced View).  When I select the "view basic members (Basic View)" link, the Fields tab disappears.  I'm speculating that this is why the GetFields method returns null.  Any thoughts? 

Community Hero

Re: How to Get 'Advanced View' Object Fields?

The other possibility could be a timing issue.  Without knowing your code, can't say for sure.  But the possibility could be that Aliases.Obj does not exist yet at the time you call "GetFields".  So it will return an empty iteration object.

Double check your timing that, when you make that call, that you've waited for the page to load or the object to be instantiated or whatever.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: How to Get 'Advanced View' Object Fields?

Essentially, aqObject.GetFields does not pay attention to "Basic" versus "Advanced".  Those options in the object spy are simply a UI feature for the Object Spy and don't "turn on" or "turn off" properties and methods available to the automation code.  So, we need to look for another reason why those Fields aren't showing up.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Contributor

Re: How to Get 'Advanced View' Object Fields?

I should mention I'm using version 12.31 and the object in question is a SWTObject(RibbonSwtCanvas)

 

GetProperties and GetMethods both work on this object

New Here?
Join us and watch the welcome video: