Forum Discussion
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?
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?
- tristaanogre6 years agoEsteemed Contributor
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.- tristaanogre6 years agoEsteemed Contributor
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.
- BrandonH6 years agoContributor
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
Related Content
Recent Discussions
- 2 days agovladd1