Forum Discussion
If you have a public method which returns an array of your objects, then you should be able to access it via your code. You won't be able to access private methods or members.
Dev Tools is able to access the objects, because the interpreter translates the entire source code, and you'll have access to public, private methods and members.
If I come across a better Angular exmaple, then I'll try again.
rraghvani thank you for your suggestions.
I just had a session with our development and tried a few things afterwards:
The allShapes object is attached to the window object of the page. I.e. something like windows.allShapes should be possible. In the Edge console I see a method getShapeById("someID"), which can be called directly or with windows.getShapeById("someID") and returns a result. I.e. both the call windows.allShapes and windows.getShapeById("someID") should work. However, I can't get the "right" window object in TestComplete.
The following object is defined:
var theWindow = pageObj.contentDocument.Script.Window;
// pageObj.contentDocument.window returns the me same object as with capital letter
However, following fails (both of them)
var shape21P = theWindow.getShapeById("21P");
var allShapes = theWindow.allShapes;
because unknown method or member respectivelly .
The page is definitely written with Angular.
There are no protected members or methods (neither of the window object nor of other things).
Any idea how I could access the window object from TestComplete?
Thank you very much!
Related Content
- 8 years ago
- 8 years ago
- 10 years ago
- 12 years ago
Recent Discussions
- 9 hours ago