Forum Discussion
royd
Regular Contributor
Hi Robert,
As you suggested, I am using IE 11. Now I am getting runtime error:
JavaScript runtime error.
TypeError: Cannot read property 'color' of null
TypeError: Cannot read property 'color' of null
If you take a look at the above screenshot, the style (color) in named 'backgroud-color'. I am using the following to Log the color:
var style = page.contentDocument.defaultView.getComputedStyle(colorPrimary, ""); Log.Message(style.background-color);I am not quite sure if I should be using
Log.Message(style.background-color);
or
Log.Message(style.color);
Either way, I am getting the same error.
Thank you.
tristaanogre
6 years agoEsteemed Contributor
In the code that I'm using, I get the element from the page in IE... then I get the "currentStyle.backgroundColor" property. I think that's better than the getComputedStyle method. See if that works better for you.
- royd6 years agoRegular Contributor
Thank you. I will give it a try.
Related Content
- 11 years ago
Recent Discussions
- 14 hours ago