- Download and install JDK 1.7 in D:\Program Files\Java\jdk1.7.0
- Add Environment Variable (Right Click My
Computer → Advanced → Environment Variables) for JAVA_HOME.
- Include in path, JAVA_HOME\bin.
- Include in
Classpath, JAVA_HOME\lib\rt.jar.
- Download and extract JUnit.
- Download and extract Apache commons logging
jars.
- Install FireFox.
- Set path to Firefox\bin in Environment
Variables.
- Create profiles for Firefox using “firefox.exe
–profilemanager”. Note:
Profiles should be created in a different folder, i.e. other than the
default folder.
- Download Selenium IDE.
- Add Selenium IDE as FireFox plug-in
- Download and extract Selenium Java Client
drivers. Add the extracted jars to
the Classpath variable.
- Download and extract Selenium Server
Standalone Server. Add the server
jar to the Classpath variable.
- Download and extract Logging Selenium.
- Install Notepad ++ for creating and editing
bat files. E.g. runServer.bat. Below are few points to note:
a.
Create a Test
Suite (TestSuite.html) and include the test cases (TestCase1.html)
exported using Selenium IDE. We cannot
execute a test case directly.
Command is:
java –jar
selenium-server-standalone-2.4.0.jar -multiwindow -htmlSuite
"*iexplore" "http://www.bing.com"
"D:\Work\Haritha\TestSuite.html"
"D:\Work\Haritha\TestResults.html”
- Install IntelliJ - Community Edition for
writing automated scripts / program for JUnit (Web Driver, Web Driver
Backed and Remote Control). Below
are few points to note:
a.
Include all the
above jars (JUnit, Apache commons logging, Selenium Java Client driver jars,
etc) including Selenium server jar to the to the global references (Add
External Jars).
b.
To execute any
Selenium JUnit code, keep the Selenium Standalone Server in start state. E.g. runServer (Shortcut placed on desktop)
Command is:
java –jar
selenium-server-standalone-2.4.0.jar -multiwindow
c.
Create package com.example.tests
in the JUnit project. Exported code (TestCaseRC.java)
from Selenium IDE should be placed in this package.
References:
---
No comments:
Post a Comment