ATF - Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2021 02:16 AM
I was facing the below error while asserting a text on a change form .There was a error message generated by g_form.addErrorMessage(). Ia m trying to validate whether its present on the form
Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:21 PM
Hi Eduardo,
we will find a solution (hopefully)!
Well, since the CSS is loaded on 3 of your Themes, its always being loaded by any portals using those themes.
To test if ATF would work without the CSS, note the 3 themes and then remove the CSS from all of them. And then give ATF a try if that helped.
Curiously, we use Roboto too, but included it into our main CSS for our portal like this:
@import url('https://fonts.googleapis.com/css?family=Roboto');
@font-face {
font-family: 'Roboto';
src: url('https://fonts.googleapis.com/css?family=Roboto');
font-weight: normal;
font-style: normal;
}
Kind regards
Oliver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2022 06:46 AM
Hi Oliver,
Thanks so much for all your help. See you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2022 07:47 AM
I think this maybe solved in a future release
https://docs.servicenow.com/en-US/bundle/sandiego-release-notes/page/release-notes/quality/sandiego-patch-2.html mentions KB1116235
Automated Test Framework PRB1541068 |
GlideScreenshot and Assert Text on Page fails when the styleSheets are delivered from a different domain (CDN) | If stylesheets are delivered from a CDN, the user's browser prevents them from accessing styleSheet.cssRules with JavaScript. |
Refer to the listed KB article for details. |
Intended Fix Version
Rome Patch 9 | |
Tokyo |
Fixed In
San Diego Patch 2 |