18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_accessor() not respecting context set with _selectWindow()
Hi,
I have something like:
If I call the second line directly on the popup window it's working well, but when run in my script it does not respect the context set by _selectWindow();. Setting the context explicitly does however work:
Is this a bug or by design? I would really like _selectWindow(); to be respected here, as it keeps the code clean and readable.
PS: Is this the right place to report bugs?
I have something like:
_selectWindow('myPopup');
_accessor('document.applets[0]').myJavaScriptFunction();
If I call the second line directly on the popup window it's working well, but when run in my script it does not respect the context set by _selectWindow();. Setting the context explicitly does however work:
_popup('myPopup')._accessor('document.applets[0]').myJavaScriptFunction();
Is this a bug or by design? I would really like _selectWindow(); to be respected here, as it keeps the code clean and readable.
PS: Is this the right place to report bugs?
This discussion has been closed.
Comments
You can report bugs here, that is fine. (We pick the real ones and internally track it.)
What you observe is not about _accessor and _selectWindow. Since the applet is on the browser, you need to call it from inside a _call statement.
Use
It's rather confusing at times that code that works from the controller doesn't work when run via Ant. I can't really see what the difference is, but I guess I'll just have to live with that.
Thanks for helping out!
- Peter