Showing posts with label selenium profile. Show all posts
Showing posts with label selenium profile. Show all posts

Tuesday, 19 March 2013

Unsupported Major/Minor Version issue while executing Selenium Scripts / Java Programs using Eclipse IDE

Purpose: When ever we are executing Selenium Scripts / Java Program which is developed / written in some othere version than our version we will get the error "Java.lang.UnsupportedClassVersionError: .............................Unsupported major.minor version"

If you are executing the program using Console / Command Prompt, using additional parameter -source <version number>

For example, if your file name is VersionError.java and executing through Command Prompt use the following command to execute successfully:

javac -source 1.4 VersionError.java

The program will compile successfully.

If you are executing the code using Eclipse IDE follow the steps mentioned below:

Step 1: Click on 'Project' menu option and select 'Properties' submenu.



Step 2: Click on Project Facts from RNP and Select Java in RNP




Step 3: Select required version of Java and click on OK.

Now Run the application and the issue will be resolved.

Saturday, 25 February 2012

Creating Firefox Profile Template

Purpose: To overcome Certificate Verification, Application Dependent Certificates, Security Notifications

When ever we are working with Selenium Server (RC), every time the server starts Firefox browser it starts in separate profile. This may lead to fail the test case because of Digital Certificate Verification etc instead of AUT .



To resolve this issue we can create a Firefox Profile, add that certificate and pass the profile path to Server while starting the server.

Steps to Create Firefox Profile Template

1. Open Run and type "firefox.exe -p" and press enter.


2. This will leads to "Firefox - Choose User Profile" prompt.


3. Now click on Create Profile button, Click Next, provide profile name, location and press Finish button


4. Add the required Security Certificates digital certificates etc.

5. Now we need to provide additional parameter while starting the server as follows:

>java -jar <selenium server>.jar -firefoxProfileTemplate "path of newly created profile"

6. Now you can run the application without fail.