I've just learned that there is a difference between a browser's "view source" and "inspect element". When I use "inspect" in firefox on a specific webpage I get the following:
<html>
...
<div class="someClass" id="someID" style="z-index: 12001; left: 0px; top: -487px; width: 1288px; height: 843px; opacity: 0.7; visibility: visible;">
...
</html>
However, when I use "view source" I don't see this element. The problem of not seeing the element occurs, when I access the webpage via Spynner and parse the html. Since I need to know the value of "visibility", my question is: how can I access the DOM within Spynner?
I've already tried the following source code:
br = spynner.Browser()
br.show()
br.load(url)
ret = br.runjs('document.getElementById('someID');")
print ret
But this will only print out:
<PyQt4.QtCore.QVariant object at 0x9870e64>
//
EDIT
Since ret is a QVariant I managed to turn it into a PyObject by modifying my code:
ret = br.runjs('document.getElementById('someID').getAttribute('style');")
print ret.toPyObject()
The only problem I have right now is: print only displays the first value of "style"
z-index: 9999;
Can I somehow access the other values (left, top, height, opacity, visibility)?