Showing posts with label Selenium Automation. Show all posts
Showing posts with label Selenium Automation. Show all posts

Saturday, 4 July 2015

Download links for selenium

This post is created in the view of newbies for Selenium Automation and their system setup. In your system make a separate work directory and name it as Selenium-Works. Most of the Windows or Linux systems when you download files it will be stored in the Downloads directory.

Selenium automation Learning Path


These is the starting point of simply learn Selenium Automation. Know basic about Java programming or Python programming. If you know when to use what then it would be time saver and also your efforts.

Here we have URL's for Downloads select your favorite latest and stable versions.
  1. Eclipse used to develop the Java code http://www.eclipse.org/downloads/  --
  2. JDK is required to run the Java. http://www.oracle.com/technetwork/java/javase/downloads/index.html 
  3. Selenium-server-standalone jar file select latest stable version http://docs.seleniumhq.org/download/  --
  4. Firebug  https://addons.mozilla.org/en-US/firefox/adon/firebug/
  5. Firepath https://addons.mozilla.org/en-US/firefox/addon/firepath/ 
  6. ChromeDriver http://chromedriver.storage.googleapis.com/index.html
  7. IE Driver http://docs.seleniumhq.org/download/
  8. Sikuli https://launchpad.net/sikuli/+download  
  9. Bugzilla https://landfill.bugzilla.org/bugzilla-4.4-branch/

Will keep adding soon with latest new browser drivers, which are required in different projects. Most common browsers Mozilla, IE, Chrome related downloads given above. If you found any other driver related information please comment here.

Thursday, 25 June 2015

How to print the dorpdown values which are hidden ?

The following program will illustrate the drop down list of values from a webpage, which are hidden! This is amazing program, which is very useful when you really do the automation with Selenium.



import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class MakeMyTrip {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get("http://www.makemytrip.com/");
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.findElement(By.xpath("//span[input[@tabindex='4']]//a")).click();
        List cities = driver.findElements(By.xpath("//li[@class='ui-menu-item']"));
        System.out.println("Number of cities : "+cities.size()); //this will take only those which are visible in 1st click
        for(int i=0; i
output- 
Number of cities : 47
1) city name: New Delhi, India (DEL)
2) city name: Mumbai, India (BOM)
3) city name: Bangalore, India (BLR)
4) city name: Goa, India (GOI)
5) city name: Chennai, India (MAA)
6) city name: Kolkata, India (CCU)
7) city name: Hyderabad, India (HYD)
8) city name: Pune, India (PNQ)
9) city name: Ahmedabad, India (AMD)
10) city name: Cochin, India (COK)
11) city name: Jaipur, India (JAI)
12) city name: Dubai, UAE (DXB)
13) city name: Singapore, Singapore (SIN)
14) city name: Bangkok, Thailand (BKK)
15) city name: New York, US - All Airports (NYC)
16) city name: Kuala Lumpur, Malaysia (KUL)
17) city name: London, UK - All Airports (LON)
18) city name: Hong Kong, China (HKG)
19) city name: Doha, Qatar (DOH)
20) city name: Colombo, Sri Lanka (CMB)
21) city name: Agartala, India (IXA)
22) city name: Agatti Island, India (AGX)
23) city name: Ahmedabad, India (AMD)
24) city name: Aizawl, India (AJL)
25) city name: Allahabad, India (IXD)
26) city name: Amritsar, India (ATQ)
27) city name: Aurangabad, India (IXU)
28) city name: Bagdogra, India (IXB)
29) city name: Bangalore, India (BLR)
30) city name: Belgaum, India (IXG)
31) city name: Bellary, India (BEP)
32) city name: Bhavnagar, India (BHU)
33) city name: Bhopal, India (BHO)
34) city name: Bhubaneshwar, India (BBI)
35) city name: Bhuj, India (BHJ)
36) city name: Calicut, India (CCJ)
37) city name: Chandigarh, India (IXC)
38) city name: Chennai, India (MAA)
39) city name: Cochin, India (COK)
40) city name: Coimbatore, India (CJB)
41) city name: Dehradun, India (DED)
42) city name: Dharamshala, India (DHM)
43) city name: Dibrugarh, India (DIB)
44) city name: Dimapur, India (DMU)
45) city name: Diu, India (DIU)
46) city name: Gaya, India (GAY)
47) city name: Goa, India (GOI)