9d. WebDriver – Executing the Test

What good is a line-by-line code walk-through, if you can’t execute and see the output? So without any more fuss, let’s run our code!!

Eclipse gives us the power to do this very same task in 3 ways,

  • Method 1: Click on the ‘Run’ shortcut icon in Eclipse.
  • Method 2: Right click on the class file, Run As -> Java Application.
  • Method 3: Use the combination, CTRL+F11.

Test execution

Sprinkling in some visual relief:

Executing our test will open a new Firefox browser window and perform the test steps as per the code. The output is displayed in the console as shown in the above screenshot.

Time for the first BrainBell of WebDriver series: Recall! Do you know that in the process of remembering things, we even add new thoughts to it? Recalling is an on-the-fly reconstruction of elements scattered in our brain – call it, creative re-imagination. The more you recall, the better you remember!

So recall how we came up with the code for our fist scenario that we just executed and you are all equipped to try some simple scenarios of your own. Give me a shout in the comments section if you encounter any bumps in your journey.

See you again in another post! Have a nice day!

<< 9c. WebDriver – First test script by launching Firefox 9e. WebDriver – Code samples for launching other browsers >>

2 Comments 9d. WebDriver – Executing the Test

  1. Sudesh

    I have started following your blog and it is really different than other bogs and in more detail.
    “Sprinkling in some visual relief” is a good point for learners.

    I will post my experience once I am done.


Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.