Many web pages are blank - loaded by Javascript which doesn't run? - only when GUI automation script AutoHotkey types the URL

33 views Asked by At

I'm trying to script GUI automation (Tampermonkey, AutoHotkey, etc.) to interact with web pages, but often my script will type in a website in the URL, and then Firefox seems to connect to the web site but then nothing happens. The website is just a blank, though the web page title shows up on the browser's title bar. This doesn't happen when I manually type in a website address: the website loads properly. Since Firefox should not be able to tell whether it is a human or a GUI script that types in the website name, I'm trying to figure out what the difference is. Is it because I have to wiggle my mouse or click on the blank page or something?

With one of the blank sites, I turned on Tools > Browser Tools > Web Developer Tools, and was able to see this as the source code behind the web site:

<body>

<app-root></app-root>
<script src="runtime.abbb57ba8624f203.js" type="module"></script>
<script src="polyfills.08668b7cf6901921.js" type="module"></script>
<script src="main.d2797894c23c067c.js" type="module"></script>

</body>

That's the entirety of the body. Presumably the scripts are supposed to run and then load the intended web content. (I can't give the actual website URL due to workplace policy restrictions.)

Why do I get a blank web page? Is it because it just takes time to load? I wait over 10 seconds and the web page is still blank. Or is there some way it distinguishes a bot typing in the URL in the browser from me typing it in?

0

There are 0 answers