0

I would like to know how to insert CSS, JS, and HTML into a DOM. I have a CSS, JS, and HTML file that should be loaded into the DOM after calling a URL.

I have the DOM itself yes can load via

import webview

def change_dom(window):
    result = window.evaluate_js("document.documentElement.outerHTML")
    print(result)

if __name__ == '__main__':
    window = webview.create_window('URL Change Example', 'https://www.amazon.de')
    webview.start(change_dom, window)

Thought to myself if I just insert the whole thing with BS4, but don't know if the way is not too cumbersome.

TylerH
  • 20,799
  • 66
  • 75
  • 101
marv
  • 19
  • 3
  • Related https://stackoverflow.com/questions/65341560/python-selenium-add-li-to-ul – TylerH Oct 18 '22 at 19:29
  • Also https://stackoverflow.com/questions/30352196/how-to-insert-text-or-html-to-a-specific-dom-element-by-pythonseleniumwebdrive – TylerH Oct 18 '22 at 19:29

0 Answers0