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.
Unable to get angularjs scope
I can't get the angularjs scope from a web page, I've tried to get it with the following code:
When I play the script, it generate the following error
Changing the Evaluate Expression mode, from Sahi-Browser to JS, in Sahi Controller, the code works correctly, so the problem would be Sahi evaluated mode .
Any idea to process the code with JS mode on playback?
Thanks
var $scope = window.angular.element(document.body).scope();
When I play the script, it generate the following error
Logging exception: Cannot call method "element" of undefined
Cannot call method "element" of undefined
Changing the Evaluate Expression mode, from Sahi-Browser to JS, in Sahi Controller, the code works correctly, so the problem would be Sahi evaluated mode .
Any idea to process the code with JS mode on playback?
Thanks
