I am trying to read this HTML in the console in Chrome:

```
<span id="lblSummaryFreight">Kr 79</span>

```

Using this JS: 

```
document.getElementById('lblSummaryFreight').innerHTML;

```

However, after the page has loaded, running this line returns null or invalid. If i inspect the element and then run the code, it works as intended and returns "Kr 79". So, is it some kind of DOM issue I am not aware of, or a browser-specific issue? 

I am using this as a variable in Google Tag Manager, and it works in 50% of the cases. I don't have access to the source code of the webpage itself, so that's why I need to lean on this rather clunky way of getting the data.

A lot of posts on this suggest that this is because the script is fired before the DOM is ready, but I don't think this is an issue, as I am also testing this in the console after the page has loaded (and the HTML elements are present), and in Google Tag Manager I have specified that the tag should fire after DOM is ready. 

Any clues?

Edit / Clarification: I can't alter the code of the page itself, only read the output source, which i am trying with JS via GTM