Forum Archive

WebView "Inspect Element"?

jbl

Hi,

A newbie with the ui module and kind of python too so thanks in advance.

I'm wondering if there is any way, in a WebView, to get information back about interactions with a webpage. So specifically, imagine something like an "inspect element" button on a desktop browser. Could you, for example, print to the console the HTML associated with a button you click?

If that's possible, could someone point me in the right direction as to where to start? In reading docs and the forum, I'm not getting anywhere.

Thanks!

JonB

Although it is a bit finicky and smallish, firebug-lite does work on the ipad, and has an inspect feature. Here is an example of how you could integrate this into pythonista.
https://gist.github.com/85a26b89b01dfe9a488c4bdc6f6827c6

If I knew js/css better, I would increase the button sizes a smidge, and make it so you can redisplay the plugin after dismissing it...right now when it closes...it is closed for good.