I'm trying to execute jQuery/Angular calls via WWW::Mechanize::Firefox's eval_in_page
. I'm guessing there is some sort of scope issue, because I'm getting errors.
If I try to execute this code:
angular.element(document.getElementsByClassName("input")[0]).triggerHandler(('change');
I get this response:
MozRepl::RemoteObject: ReferenceError: angular is not defined at ...
If I try to execute this code:
$(".input").val("Foo")
I get this response:
MozRepl::RemoteObject: ReferenceError: $ is not defined ...
It seems I don't have access to either framework. The page does appear to have both loaded, however. If I execute the code in the browser console it works fine.