
Announcements
PAD update to extensions has broken some click on links on my web application.
Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.So I am trying the alternative - to use JavaScript to click on a link on the page instead BUT It's not triggering the JavaScript for me on the page...
I am trying to run a command, which simulates clicking a link:
javascript .... submitAction_win0(document.win0,'DERIVED_ADDR_UPDATE_ADDRESS$0');The js works when I paste into console (a popup form opens) but in PAD nothing happens at all. I set an alert and that fires but not my submitAction.
This is the HTML
<a name="DERIVED_ADDR_UPDATE_ADDRESS$0" id="DERIVED_ADDR_UPDATE_ADDRESS$0" ptlinktgt="pt_peoplecode" tabindex="355" onclick="javascript:cancelBubble(event);" href="javascript:submitAction_win0(document.win0,'DERIVED_ADDR_UPDATE_ADDRESS$0');" class="PSHYPERLINK" winautomationvisibilitylandmark="true" mspad-previous-style="" style="">Edit Address</a>
What is going on I'm totally stuck now! I also tried:
document.getElementById('DERIVED_ADDR_UPDATE_ADDRESS$0').click();
Which again works in console but not in PAD
Interestingly I found if you use the recorder to click the link it works! And then you can copy that recorded action and use the UI selector to choose another link.
BUT if you use the Action 'Click link on webpage' you get the error:
Refused to run the JavaScript URL because it violates the following Content Security Policy directive:
So they have to fix this...
There you go MS I did your testing for you.
I am having to use the recorder to click certain links at the moment.