I'm using Selenium with Visual Studio 2017 on an ASP.NET MVC application. Driver is ChromeDriver 2.42.01. Everything works, however one of my tests involves clicking a div which is wrapped into an anchor:
<a class="allowed" href="javascript:loadRegistrationPopUp(10031)">
<div class="selectContentContainer class-time">
...
</div>
</a>
The function is causing an error because it is undefined. Looking at the page source in Chrome, I find that a major part of the Javascript is missing, particularly the line that includes my script bundle where the function is living. If I open the very same page in a regular Chrome instance, I can see:
<script src="/bundles/default?v=3n...pSQ1"></script>
But that script include (together with the Javascript) is missing when running with Selenium.
To make things even stranger: running the same test on another machine does work, the bundle is there. Same version of Chrome.
What could be causing this?