Having trouble running a YUI js script using js.executeScript Selenium method. The script is being executed by Selenium Webdriver to simulate a "click" on a hybrid mobile app (the button is in a webview).
String IncludeYUI = "script = document.createElement('script');script.type = 'text/javascript';script.async = true;script.onload = function(){};script.src = '"
+ YUI_PATH
+ "';document.getElementsByTagName('head')[0].appendChild(script);";
js.executeScript(IncludeYUI);
where the YUI_PATH is a URL - https://cdnjs.cloudflare.com/ajax/libs/yui/3.18.0/yui/.....
Encountering a problem due to the lack of access to the global network from the current site.
Considering saving the script under the project and loading it from the file system, but facing limitations with JavaScript and file system access.
Any suggestions on how to handle script loading in this scenario?
Thank you