Thursday, 22 January 2015

Windows Update for KB3025390 causes (Selenium) automation testing to fail in IE

Our Selenium Java project stopped working in IE just before Christmas and it was very frustrating as we did not change anything in our code for a long while. It works in Chrome, however, IE is our main browser we use for automation testing. We are currently using IE 11 + Windows 8.1 for our testing.

The last time we ran our automation test was several months ago. So I tracked down the issue and found it was very clear that IE stopped understanding in any way how to find an element. As soon as reaching the code for finding an element either by id or name or xpath, etc., the element cannot be found and a NoSuchElement exception was thrown.

It is a special day today as we found the root cause of this problem (thank you my dear team mate). She found the issue is related to a Windows update. By chance, she has been using Selenium-Grid and running the automation test on another VM. She used yesterday and found it worked and then it stopped working today as the VM got updated via Windows update. She tracked down and found the problematic update is related to the Update for Microsoft Windows (KB3025390)

So after uninstalling this Windows update, our automation test started working again. We then googled and found this update causes some other issues as well. 

Friday, 2 January 2015

Why all icon images are missing in Crystal Reports Web Viewer?

There is an issue happens to Crystal Reports Web Viewer very often. It is about the icons on the interface all disappeared at certain point of time. It does not affect the functionality of the buttons or viewing of the report contents. But it does not look professional for a business application.

We found there are several options can be used to solve this problem:

Option 1: add the site in the Compatibility View list in IE. This solution works when not only the icons are missing but also the report format looks wrong and different than designed.

Option 2: reinstall the Crystal Reports runtime. Usually, this happens when the .NET framework installed after the Crystal Reports runtime was installed. So we need to reinstall the Crystal Reports runtime again to ensure all related contents are in the correct place.

Option 3: an alternate way of Option 2 without reinstallation is to find the C:\inetpub\wwwroot\aspnet_client\system_web\ folder on the web application server. There will be several folders named after different versions of .NET framework e.g., 2_0_50727*, 4_0_30319*, etc.

As usually the highest .NET framework is used by the web application, open the lower version folder e.g., 2_0_50727* and there will be a folder called CrystalReportWebFormViewer4. In this folder, there would be all the images used on the Crystal Reports Web Viewer. You can copy the entire folder to the highest version numbered folder such as 4_0_30319* in our example. By saying so, you will still need to check which .NET framework your web application uses just in case and operate accordingly.