Sunday, 6 October 2019

Installations & Configurations

Java Installation

  • Download Java from the below link - https://www.oracle.com/java/technologies/javase-jsp-downloads.html
  • If runnable file – Run the Downloaded file and click Next until Finish
  • If zip/rar file – Extract it and place it in a specific location where all the program files of the operating system are being placed
  • Hurray ! Java is installed
Setting up the JAVA_HOME

  • If Windows:
    - Run the below command in CMD (command line)
    setx JAVA_HOME -m "Path“
    - For “Path” paste in your Java installation path
  • If Mac OS:
    - Open Terminal
    - Confirm you have JDK by typing “which java”
    - Check you have the needed version of Java, by typing “java -version”
    - Set JAVA_HOME using this command in Terminal:
    export JAVA_HOME=/Library/Java/Home
    - echo $JAVA_HOME on Terminal to confirm the path
  • If Linux flavors:
    - Launch Terminal by pressing Ctrl+Alt+T on your keyboard
    - Enter the following command:
       $ gksudo gedit /etc/environment
    - Depending on where you installed your Java, you will need to provide the full path
    - Scroll to the end of the file and enter the following:

    JAVA_HOME=<Java installed Path>
    export JAVA_HOME
    - Save your file and exit gedit
    - Lastly, reload the system PATH with the following command:

    $ . /etc/environment
Eclipse Installation & Setup

  • Follow the below steps to download the setup file
    - https://www.eclipse.org/downloads/packages/
    - Choose “Eclipse IDE for Enterprise Java Developers”
    - Click on specific download link based on your operating system
  • Yaay ! Downloaded. Lets install it now

  • You must have downloaded the zip file, so follow the below steps to install it neatly
    - Create a new folder “Eclipse”
    - Extract the downloaded zip to the “Eclipse” folder
    - Go to the extracted folder
    - Did you see the eclipse files ! Oh yeah ! It’s time to celebrate :D
Download Selenium WebDriver
  • Follow the below steps to download the Selenium
    - Go to location https://www.seleniumhq.org/download/
    - Did you find anything like below !
  • Now click on the download link of your choice of programming language (I always choose Java, btw)
  • Hurray ! Now you have downloaded the Selenium WebDriver Library
  • Now extract the downloaded zip file to a specific location
    (Try to create a new folder “Selenium” and extract into it)
Setup Selenium Library to your project
  • Open eclipse
  • Do you see your Project in the Project Explorer section ? Not yet ?
  • Then create a project and comeback to follow the below steps - Right click on the project title
    - Mouse-over to “Build Path” (side-slider menu will appear)
    - Click on “Configure Build Path”
    - Go to Libraries section and click on “Add External Jars”
    - Browse to the location where you stored the extracted Selenium Library files
    - You see below two files there, select both and click add/ok
    client-combined-3.141.59.jar
    client-combined-3.141.59-sources.jar
  • Yaay ! Celebrate again !

Introduction

Selenium is a web application automation tool, which is widely use in the current industry. There are few factors that are pushing its usage to next level.

Features of Selenium:
  • Selenium is free
    • available to download from seleniumhq.com
  • Works explicitly on web applications
  • It is technology independent
    • Can be written in any programming language like Java, PHP, Python etc.
    • Can be Integrated with any other frameworks like TestNG and Cucumber
  • Works on all famous browsers (Firefox, Chrome, Opera, Safari and IE)
Required tools for automation using Selenium:
  • Any programming language that supports Selenium
    • Java as an example
  • Integrated Development Environment
    • Eclipse, NetBeans, intelliJ etc.
  • Selenium WebDriver Libraries
    • Can be downloaded from seleniumhq.com
    • Always prefer the latest files
Steps to Proceed:
  • Install Java in your machine (any programming language of your choice)
  • Install Eclipse (any IDE of your choice)
  • Create your Project and Add Selenium Libraries