HtmlUnit doesn't load externally referenced javascript

前端 未结 2 1538
终归单人心
终归单人心 2021-01-15 01:47

I have run into a problem while trying to test a web application with HtmlUnit. Please bear in mind that I haven\'t used HtmlUnit very long so I might be missing something t

相关标签:
2条回答
  • 2021-01-15 02:13

    That tag loads an external file: "urltofile.js", so it's not strange to have nothing into because the js code is loaded from that file and not injected into the existing markup.

    0 讨论(0)
  • 2021-01-15 02:21

    After many many hours of googling I found the solution to be very simple. All I had to do was to wait a few seconds after the page is retrieved to allow the javascript some time to execute before doing anything else. I can honestly say finding the solution was a bit of an anticlimax, but at least I can move along to more important stuff now. :)

    0 讨论(0)
提交回复
热议问题