ASP n00b

I have been doing almost exclusively Java development in previous years.

I started my new job and got thrown into ASP (VBScript), ASP.NET, IIS…

TryParse

Debug – attach process

asp uses vbscript and asp.net (.cs) uses .NET

so in debug mode, pick Script or Managed code (v4.0, v4.5) accordingly

I hope no body needs to know about asp because asp is SOOOO old.

I find most success with enabling debugging on server & client side (settings in IIS), and let that do the work, instead of attaching process in Visual Studio

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

is where the cache is, delete that whenever you need to have a fresh state

Err object – reference

You can view description with Err.Description and maybe Err.Number (not always populated)

Advertisements

Eclipse, Maven, and JDK 1.8

Error:

You need to run build with JDK or have tools.jar on the classpath.If this occures during eclipse build make sure you run eclipse under JDK as well

Make sure you uninstall the older version of Java from your computer

I had Java 7 installed and then I installed Java 8 on top of it. Go to Program Features and remove all Java 7s.

Launch Eclipse with your JDK:

in eclipse.ini, add -vm [path to your 1.8 jdk] ABOVE -vmargs

In Eclipse, open Window > Perference > type Installed JREs

Add your JDK there as a Standard VM, ensure it is checked, apply.

If your maven project still give you the error, add the jdk to the build path of your project

Right click your project > Build Path > Configure Build Path > go to Libraries tab

Add Library > find your jdk that you added to Eclipse

move the JDK to the top, remove other JRE from the build path window.

My maven project can build without error now. 🙂

Selenium, IE 11, and new windows don’t mix

There are tons of forum posts saying that popups don’t work with Selenium in Internet Explorer.

In my case, I am using Visual Studio 2015 to run Selenium tests on an ASP website. I have IE11 and was trying to run the Selenium test cases in Debug mode. The selenium command line window either crashes, or IE crashes. Anyways, the new window will not show up.

I tried installing the latest version of the Internet Explorer Driver Server (IEDriverServer.exe), which is 2.48.0. I installed a 64bit version of it and was horrified to see the sendKey action takes 2-4 second between each character… I researched and it is a known problem with 64bit driver, with explanation. I switched to 32bit and problem seems to go away. I had to close all IE windows, clean project, restart visual studio to take effect.

I tried changing registry as described in https://code.google.com/p/selenium/wiki/InternetExplorerDriver but it did NOT work for me. With “TabProcGrowth = 0 ” I sometimes still get that horrible slow keystroke problem.

My Final Solution

I verified that the popup test is working on my coworker’s machine. He had IE10.

So I downgraded to IE10 from IE11

After a few reboots, I RUN the tests instead of Debug

windows pop up now, Selenium able to switch windows!

I spent half a day troubleshooting… so I will let my tests pass now. I won’t force it to work with Debug mode.

Gradle + Eclipse, getting set up

I’ve only had experience with Maven but not Gradle. Here’s a quick short post about getting it set up in Eclipse.

In Eclipse, install the Gradle IDE plugin from Marketplace

  • Eclipse > Help > Eclipse Marketplace > type ‘Gradle’ in Find > Go > look for Gradle Integration for Eclipse and install that

I also recommend getting the Minimalist Gradle Editor plugin for coloring / highlighting syntax in .gradle files

Once the above is installed and your Eclipse restarted, you are ready to import Gradle projects into Eclipse.

Here are some great clips to get started with Gradle on YouTube

Gradle Tutorial (3 videos)