You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test an svg with an embedded script like described here.
What is the Current behavior?
I make test with testcafe on an app that displays an svg with an embedded script.
I GET the svg then I inject it writing innerHTML.
I got that error:
hammerhead.js:10 Uncaught (in promise) TypeError: Illegal invocation
at t.getScriptContent (hammerhead.js:10)
at e._processScriptElement (hammerhead.js:9)
at e.processElement (hammerhead.js:9)
at hammerhead.js:2
at Ii (hammerhead.js:2)
at Ri (hammerhead.js:2)
at HTMLDivElement.setter [as innerHTML] (hammerhead.js:12)
at ?editor_console=:126
In raw web browser it works
If I remove the <script> part of my svg it works also with hammerhead.
What is the Expected behavior?
hammerhead to not crash on finding script in svg.
What is your public website URL? (or attach your complete example)
import{Selector}from"testcafe";fixture`SVG script page`;test("svg script",async(t)=>{awaitt.navigateTo("https://jsfiddle.net/tipy01/dn7u4rpL/67");constiframeSelector=Selector('iframe',{timeout: 60000}).withAttribute("name","result");awaitt.switchToIframe(iframeSelector);awaitt.expect(Selector("svg").withText("Click on circle to change its size").exists).ok();});
What is your Scenario?
Test an svg with an embedded script like described here.
What is the Current behavior?
I make test with testcafe on an app that displays an svg with an embedded script.
I GET the svg then I inject it writing innerHTML.
I got that error:
In raw web browser it works
If I remove the <script> part of my svg it works also with hammerhead.
What is the Expected behavior?
hammerhead to not crash on finding script in svg.
What is your public website URL? (or attach your complete example)
https://jsfiddle.net/tipy01/dn7u4rpL/67/
With a workaround consisting of removing script in svg it passes:
https://jsfiddle.net/tipy01/dn7u4rpL/66/
What is your TestCafe test code?
Your complete configuration file
module.exports = {
}
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
TestCafe version
1.18.1
Node.js version
16.13.2
Command-line arguments
chrome
Browser name(s) and version(s)
Chrome Version 92.0.4515.159, Firefox 96.0
Platform(s) and version(s)
Ubuntu 20.04.3
Other
No response
The text was updated successfully, but these errors were encountered: