IMDb Top 250

Learn by examples

Learn by examples

Take this Code from PasteBIN

 

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TestIMDbTop250movies {

public static String StartString=null;
 public static String EndString=null;
 public static void main(String[] args) {
 WebDriver myTestDriver = new FirefoxDriver();
 myTestDriver.manage().window().maximize();

myTestDriver.navigate().to("http://www.imdb.com/chart/top");

 StartString = "//*[@id='main']/table[2]/tbody/tr[";
 EndString = "]/td[3]/font/a";

 for(int i=2;i<=251;i++){
 System.out.println(myTestDriver.findElement(By.xpath(StartString + i + EndString)).getText());
 System.out.println(myTestDriver.findElement(By.xpath(StartString + i + EndString)).getAttribute("href"));;

 }

 myTestDriver.quit();
 }

}

 

Output @ Console:

The Shawshank Redemption
http://www.imdb.com/title/tt0111161/
The Godfather
http://www.imdb.com/title/tt0068646/
The Godfather: Part II
http://www.imdb.com/title/tt0071562/
Pulp Fiction
http://www.imdb.com/title/tt0110912/
The Good, the Bad and the Ugly
http://www.imdb.com/title/tt0060196/
12 Angry Men
http://www.imdb.com/title/tt0050083/
The Dark Knight
http://www.imdb.com/title/tt0468569/
Schindler’s List
http://www.imdb.com/title/tt0108052/
The Lord of the Rings: The Return of the King
http://www.imdb.com/title/tt0167260/
Fight Club
http://www.imdb.com/title/tt0137523/
Star Wars: Episode V – The Empire Strikes Back
http://www.imdb.com/title/tt0080684/
One Flew Over the Cuckoo’s Nest
http://www.imdb.com/title/tt0073486/
The Lord of the Rings: The Fellowship of the Ring
http://www.imdb.com/title/tt0120737/
Inception
http://www.imdb.com/title/tt1375666/
Goodfellas
http://www.imdb.com/title/tt0099685/
Star Wars
http://www.imdb.com/title/tt0076759/
Seven Samurai
http://www.imdb.com/title/tt0047478/
The Matrix
http://www.imdb.com/title/tt0133093/
Forrest Gump
http://www.imdb.com/title/tt0109830/
City of God
http://www.imdb.com/title/tt0317248/
The Lord of the Rings: The Two Towers
http://www.imdb.com/title/tt0167261/
Once Upon a Time in the West
http://www.imdb.com/title/tt0064116/
Se7en
http://www.imdb.com/title/tt0114369/
The Silence of the Lambs
http://www.imdb.com/title/tt0102926/
Casablanca
http://www.imdb.com/title/tt0034583/
The Usual Suspects
http://www.imdb.com/title/tt0114814/
Raiders of the Lost Ark
http://www.imdb.com/title/tt0082971/
Rear Window
http://www.imdb.com/title/tt0047396/
Psycho
http://www.imdb.com/title/tt0054215/
It’s a Wonderful Life
http://www.imdb.com/title/tt0038650/
Léon: The Professional
http://www.imdb.com/title/tt0110413/
Sunset Blvd.
http://www.imdb.com/title/tt0043014/
Memento
http://www.imdb.com/title/tt0209144/
American History X
http://www.imdb.com/title/tt0120586/
Apocalypse Now
http://www.imdb.com/title/tt0078788/
Terminator 2: Judgment Day
http://www.imdb.com/title/tt0103064/
The Dark Knight Rises
http://www.imdb.com/title/tt1345836/
Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb
http://www.imdb.com/title/tt0057012/
Saving Private Ryan
http://www.imdb.com/title/tt0120815/
Alien
http://www.imdb.com/title/tt0078748/
City Lights
http://www.imdb.com/title/tt0021749/
North by Northwest
http://www.imdb.com/title/tt0053125/
Spirited Away
http://www.imdb.com/title/tt0245429/
Citizen Kane
http://www.imdb.com/title/tt0033467/
Modern Times
http://www.imdb.com/title/tt0027977/
The Shining
http://www.imdb.com/title/tt0081505/
Back to the Future
http://www.imdb.com/title/tt0088763/
Vertigo
http://www.imdb.com/title/tt0052357/
The Pianist
http://www.imdb.com/title/tt0253474/
American Beauty
http://www.imdb.com/title/tt0169547/
The Departed
http://www.imdb.com/title/tt0407887/
Taxi Driver
http://www.imdb.com/title/tt0075314/
M
http://www.imdb.com/title/tt0022100/
Paths of Glory
http://www.imdb.com/title/tt0050825/
Life Is Beautiful
http://www.imdb.com/title/tt0118799/
Toy Story 3
http://www.imdb.com/title/tt0435761/
Double Indemnity
http://www.imdb.com/title/tt0036775/
Aliens
http://www.imdb.com/title/tt0090605/
WALL·E
http://www.imdb.com/title/tt0910970/
The Lives of Others
http://www.imdb.com/title/tt0405094/
A Clockwork Orange
http://www.imdb.com/title/tt0066921/
Amélie
http://www.imdb.com/title/tt0211915/
Gladiator
http://www.imdb.com/title/tt0172495/
The Intouchables
http://www.imdb.com/title/tt1675434/
The Green Mile
http://www.imdb.com/title/tt0120689/
Lawrence of Arabia
http://www.imdb.com/title/tt0056172/
To Kill a Mockingbird
http://www.imdb.com/title/tt0056592/
The Prestige
http://www.imdb.com/title/tt0482571/
The Great Dictator
http://www.imdb.com/title/tt0032553/
Reservoir Dogs
http://www.imdb.com/title/tt0105236/
Das Boot
http://www.imdb.com/title/tt0082096/
Requiem for a Dream
http://www.imdb.com/title/tt0180093/
The Third Man
http://www.imdb.com/title/tt0041959/
The Treasure of the Sierra Madre
http://www.imdb.com/title/tt0040897/
Eternal Sunshine of the Spotless Mind
http://www.imdb.com/title/tt0338013/
Cinema Paradiso
http://www.imdb.com/title/tt0095765/
Once Upon a Time in America
http://www.imdb.com/title/tt0087843/
Chinatown
http://www.imdb.com/title/tt0071315/
The Lion King
http://www.imdb.com/title/tt0110357/
L.A. Confidential
http://www.imdb.com/title/tt0119488/
Star Wars: Episode VI – Return of the Jedi
http://www.imdb.com/title/tt0086190/
Full Metal Jacket
http://www.imdb.com/title/tt0093058/
Braveheart
http://www.imdb.com/title/tt0112573/
Monty Python and the Holy Grail
http://www.imdb.com/title/tt0071853/
Singin’ in the Rain
http://www.imdb.com/title/tt0045152/
Oldboy
http://www.imdb.com/title/tt0364569/
Some Like It Hot
http://www.imdb.com/title/tt0053291/
Amadeus
http://www.imdb.com/title/tt0086879/
Metropolis
http://www.imdb.com/title/tt0017136/
Rashomon
http://www.imdb.com/title/tt0042876/
Bicycle Thieves
http://www.imdb.com/title/tt0040522/
2001: A Space Odyssey
http://www.imdb.com/title/tt0062622/
Unforgiven
http://www.imdb.com/title/tt0105695/
All About Eve
http://www.imdb.com/title/tt0042192/
Princess Mononoke
http://www.imdb.com/title/tt0119698/
The Apartment
http://www.imdb.com/title/tt0053604/
Indiana Jones and the Last Crusade
http://www.imdb.com/title/tt0097576/
The Sting
http://www.imdb.com/title/tt0070735/
Raging Bull
http://www.imdb.com/title/tt0081398/
The Bridge on the River Kwai
http://www.imdb.com/title/tt0050212/
The Hobbit: An Unexpected Journey
http://www.imdb.com/title/tt0903624/
Die Hard
http://www.imdb.com/title/tt0095016/
Witness for the Prosecution
http://www.imdb.com/title/tt0051201/
A Separation
http://www.imdb.com/title/tt1832382/
Batman Begins
http://www.imdb.com/title/tt0372784/
Grave of the Fireflies
http://www.imdb.com/title/tt0095327/
Pan’s Labyrinth
http://www.imdb.com/title/tt0457430/
Downfall
http://www.imdb.com/title/tt0363163/
Mr. Smith Goes to Washington
http://www.imdb.com/title/tt0031679/
Yojimbo
http://www.imdb.com/title/tt0055630/
The Great Escape
http://www.imdb.com/title/tt0057115/
Snatch.
http://www.imdb.com/title/tt0208092/
For a Few Dollars More
http://www.imdb.com/title/tt0059578/
Up
http://www.imdb.com/title/tt1049413/
Inglourious Basterds
http://www.imdb.com/title/tt0361748/
The Elephant Man
http://www.imdb.com/title/tt0080678/
On the Waterfront
http://www.imdb.com/title/tt0047296/
The Seventh Seal
http://www.imdb.com/title/tt0050976/
Toy Story
http://www.imdb.com/title/tt0114709/
Heat
http://www.imdb.com/title/tt0113277/
The Maltese Falcon
http://www.imdb.com/title/tt0033870/
The General
http://www.imdb.com/title/tt0017925/
Gran Torino
http://www.imdb.com/title/tt1205489/
Rebecca
http://www.imdb.com/title/tt0032976/
Blade Runner
http://www.imdb.com/title/tt0083658/
Wild Strawberries
http://www.imdb.com/title/tt0050986/
The Avengers
http://www.imdb.com/title/tt0848228/
Fargo
http://www.imdb.com/title/tt0116282/
The Kid
http://www.imdb.com/title/tt0012349/
Scarface
http://www.imdb.com/title/tt0086250/
The Big Lebowski
http://www.imdb.com/title/tt0118715/
Touch of Evil
http://www.imdb.com/title/tt0052311/
Ran
http://www.imdb.com/title/tt0089881/
The Deer Hunter
http://www.imdb.com/title/tt0077416/
Cool Hand Luke
http://www.imdb.com/title/tt0061512/
Sin City
http://www.imdb.com/title/tt0401792/
The Gold Rush
http://www.imdb.com/title/tt0015864/
Strangers on a Train
http://www.imdb.com/title/tt0044079/
No Country for Old Men
http://www.imdb.com/title/tt0477348/
It Happened One Night
http://www.imdb.com/title/tt0025316/
Jaws
http://www.imdb.com/title/tt0073195/
Lock, Stock and Two Smoking Barrels
http://www.imdb.com/title/tt0120735/
The Sixth Sense
http://www.imdb.com/title/tt0167404/
Hotel Rwanda
http://www.imdb.com/title/tt0395169/
Platoon
http://www.imdb.com/title/tt0091763/
High Noon
http://www.imdb.com/title/tt0044706/
The Thing
http://www.imdb.com/title/tt0084787/
Butch Cassidy and the Sundance Kid
http://www.imdb.com/title/tt0064115/
The Wizard of Oz
http://www.imdb.com/title/tt0032138/
Casino
http://www.imdb.com/title/tt0112641/
Trainspotting
http://www.imdb.com/title/tt0117951/
Kill Bill: Vol. 1
http://www.imdb.com/title/tt0266697/
Warrior
http://www.imdb.com/title/tt1291584/
Annie Hall
http://www.imdb.com/title/tt0075686/
Notorious
http://www.imdb.com/title/tt0038787/
The Secret in Their Eyes
http://www.imdb.com/title/tt1305806/
Good Will Hunting
http://www.imdb.com/title/tt0119217/
Gone with the Wind
http://www.imdb.com/title/tt0031381/
The King’s Speech
http://www.imdb.com/title/tt1504320/
The Grapes of Wrath
http://www.imdb.com/title/tt0032551/
Into the Wild
http://www.imdb.com/title/tt0758758/
Life of Brian
http://www.imdb.com/title/tt0079470/
Finding Nemo
http://www.imdb.com/title/tt0266543/
V for Vendetta
http://www.imdb.com/title/tt0434409/
How to Train Your Dragon
http://www.imdb.com/title/tt0892769/
My Neighbor Totoro
http://www.imdb.com/title/tt0096283/
Dial M for Murder
http://www.imdb.com/title/tt0046912/
The Big Sleep
http://www.imdb.com/title/tt0038355/
Ben-Hur
http://www.imdb.com/title/tt0052618/
The Terminator
http://www.imdb.com/title/tt0088247/
Network
http://www.imdb.com/title/tt0074958/
Million Dollar Baby
http://www.imdb.com/title/tt0405159/
There Will Be Blood
http://www.imdb.com/title/tt0469494/
The Night of the Hunter
http://www.imdb.com/title/tt0048424/
Stand by Me
http://www.imdb.com/title/tt0092005/
Black Swan
http://www.imdb.com/title/tt0947798/
Donnie Darko
http://www.imdb.com/title/tt0246578/
Groundhog Day
http://www.imdb.com/title/tt0107048/
Dog Day Afternoon
http://www.imdb.com/title/tt0072890/
Twelve Monkeys
http://www.imdb.com/title/tt0114746/
Amores Perros
http://www.imdb.com/title/tt0245712/
The Bourne Ultimatum
http://www.imdb.com/title/tt0440963/
Mary and Max
http://www.imdb.com/title/tt0978762/
The 400 Blows
http://www.imdb.com/title/tt0053198/
Persona
http://www.imdb.com/title/tt0060827/
The Graduate
http://www.imdb.com/title/tt0061722/
Gandhi
http://www.imdb.com/title/tt0083987/
The Killing
http://www.imdb.com/title/tt0049406/
Howl’s Moving Castle
http://www.imdb.com/title/tt0347149/
The Princess Bride
http://www.imdb.com/title/tt0093779/
The Artist
http://www.imdb.com/title/tt1655442/

http://www.imdb.com/title/tt0056801/
Slumdog Millionaire
http://www.imdb.com/title/tt1010048/
Argo
http://www.imdb.com/title/tt1024648/
Who’s Afraid of Virginia Woolf?
http://www.imdb.com/title/tt0061184/
La Strada
http://www.imdb.com/title/tt0047528/
The Hustler
http://www.imdb.com/title/tt0054997/
The Manchurian Candidate
http://www.imdb.com/title/tt0056218/
A Beautiful Mind
http://www.imdb.com/title/tt0268978/
Rocky
http://www.imdb.com/title/tt0075148/
The Wild Bunch
http://www.imdb.com/title/tt0065214/
Anatomy of a Murder
http://www.imdb.com/title/tt0052561/
Stalag 17
http://www.imdb.com/title/tt0046359/
The Exorcist
http://www.imdb.com/title/tt0070047/
Sleuth
http://www.imdb.com/title/tt0069281/
Rope
http://www.imdb.com/title/tt0040746/
Barry Lyndon
http://www.imdb.com/title/tt0072684/
The Man Who Shot Liberty Valance
http://www.imdb.com/title/tt0056217/
District 9
http://www.imdb.com/title/tt1136608/
Life of Pi
http://www.imdb.com/title/tt0454876/
The Perks of Being a Wallflower
http://www.imdb.com/title/tt1659337/
Stalker
http://www.imdb.com/title/tt0079944/
Infernal Affairs
http://www.imdb.com/title/tt0338564/
Roman Holiday
http://www.imdb.com/title/tt0046250/
The Truman Show
http://www.imdb.com/title/tt0120382/
Pirates of the Caribbean: The Curse of the Black Pearl
http://www.imdb.com/title/tt0325980/
Ratatouille
http://www.imdb.com/title/tt0382932/
Ip Man
http://www.imdb.com/title/tt1220719/
The Diving Bell and the Butterfly
http://www.imdb.com/title/tt0401383/
Harry Potter and the Deathly Hallows: Part 2
http://www.imdb.com/title/tt1201607/
A Fistful of Dollars
http://www.imdb.com/title/tt0058461/
Monsters, Inc.
http://www.imdb.com/title/tt0198781/
In the Name of the Father
http://www.imdb.com/title/tt0107207/
A Streetcar Named Desire
http://www.imdb.com/title/tt0044081/
Star Trek
http://www.imdb.com/title/tt0796366/
Beauty and the Beast
http://www.imdb.com/title/tt0101414/
Rosemary’s Baby
http://www.imdb.com/title/tt0063522/
Nausicaä of the Valley of the Wind
http://www.imdb.com/title/tt0087544/
Harvey
http://www.imdb.com/title/tt0042546/
All Quiet on the Western Front
http://www.imdb.com/title/tt0020629/
The Wrestler
http://www.imdb.com/title/tt1125849/
La Haine
http://www.imdb.com/title/tt0113247/
Rain Man
http://www.imdb.com/title/tt0095953/
Shutter Island
http://www.imdb.com/title/tt1130884/
Nosferatu
http://www.imdb.com/title/tt0013442/
Spring, Summer, Fall, Winter… and Spring
http://www.imdb.com/title/tt0374546/
Battleship Potemkin
http://www.imdb.com/title/tt0015648/
Manhattan
http://www.imdb.com/title/tt0079522/
Mystic River
http://www.imdb.com/title/tt0327056/
Big Fish
http://www.imdb.com/title/tt0319061/
Shadow of a Doubt
http://www.imdb.com/title/tt0036342/
Bringing Up Baby
http://www.imdb.com/title/tt0029947/
Papillon
http://www.imdb.com/title/tt0070511/
3 Idiots
http://www.imdb.com/title/tt1187043/
Castle in the Sky
http://www.imdb.com/title/tt0092067/
The Untouchables
http://www.imdb.com/title/tt0094226/
Jurassic Park
http://www.imdb.com/title/tt0107290/
The Nightmare Before Christmas
http://www.imdb.com/title/tt0107688/
Let the Right One In
http://www.imdb.com/title/tt1139797/
In the Heat of the Night
http://www.imdb.com/title/tt0061811/

Advertisements
Pupunzi

For a better web

Tech

News and reviews from the world of gadgets, gear, apps and the web

VentureBeat

News About Tech, Money and Innovation

Digital Inspiration

Tips and tutorials around all things tech.

Thinkwareglobal's Blog

Just another WordPress.com weblog

Kenazari's Blog

Just another WordPress.com weblog

Richfowler1's Blog

Just another WordPress.com weblog

Romaicus's Blog

Just another WordPress.com weblog

botlaguduri

Just another WordPress.com site

chandanag89

Just another WordPress.com site

meghshetty

Just another WordPress.com site

digitalmediaexpert

digital media expert blog

Thinking in Silverlight

Silverlight/WPF/Windows 8 Store App

Different Journeys

Let's make life easier!

LAW RESOURCE INDIA

LEGAL RESOURCE CENTRE / COURT JUDGMENTS / LEGAL ARCHIVES

BookConnect

Promoting Indian language Books

Actively Lazy

Software, crafted with passion

SAPonPower

An ongoing discussion about SAP infrastructure

SAP Career

Your Career Mentor

hrsapcertification

Just another WordPress.com site

The secret product manager

Thoughts about product management, SUSE, Linux, ARM processors, Cloud, AIX, Power Systems, and other things that interest me

Sap Certification Material . Com

Quality store for sap software and courses

Simon Les Flex's Blog

SAP Process Integration Specialist - NOW WE CAN DO BETTER!

Oracle Technologies Primer

An Oracle Fusion Middleware and iPaaS blog!

Gilberto Holms

Java, Middleware, SOA Architecture Blog

The Skeleton

Java code skeletons, tips and pointers

J@n van Zoggel

integration, innovation & random technology stuff

The Pragmatic Integrator

Hints and tips from a pragmatic integration specialist

briskwalk

The pace of life..

Optimalbg's Blog

Just another WordPress.com site

IT Jobs in USA

Keep the track of this Blog if you are looking out for some good Opportunities to work in USA....

Referral Jobs | Right Place to Get a Job

Hurry you are one Click away to get a job - Fresher Jobs for 2012, 2013 fresher’s and also high paid jobs for well Experienced IT professionals on Referal jobs.

eccinternational.wordpress.com/

ISO Consulting | ISO 27001 | ISO 20000 | CMMI | BCM | GRI Sustainability Reporting & Assurance | eLearning | Trainings | Philippines

Michael Korn's Blog

Musings on Life, Career, Faith and Technology

WORKINGWITHQTP

Just another WordPress.com weblog

Topics

.Net Core, AspNetCore, Entity Framework, Entity Framework Core, AspNetIdentity, AspNetIdentityCore, Unit Test, WCF, Workflows

SQA and Testers Blog

Just another WordPress.com weblog

Expertqtp's Weblog

Just another WordPress.com weblog

Sai Chamarthi

Experienced Testing Professional

saxenavinay

A great WordPress.com site

Suresh4qtp's Blog

Just another WordPress.com site

jonah95hill

This WordPress.com site is the cat’s pajamas

It's always something...

Just another WordPress.com weblog

Faculty of Information Technology - Lê Ngọc Tiến

Be Yourself! Simplify Our Goals! Nothing is Impossible!

Anti-Malware Testing

Thoughts on security product testing past and present

Methods & Tools

Practical knowledge for the software developer, tester and project manager