Transformation from Manual tester to a Selenium WebDriver Automation specialist !!!

A Small guide for a tester transformation into a WebDriver scripter

 This table will be very useful for a selenium beginner who is trying out selenium WebDriver

WebDriver Commands Category


Tasks Human Interaction (Manual Tester) WebDriver Commands
Invoke Browser Tester manually opens the browser Firefox, IE, chrome or Safari [sourcecode language=”java”]WebDriver driver=new FirefoxDriver();
WebDriver driver=new SafariDriver();
WebDriver driver=new chromeDriver();
WebDriver driver=new InternetExplorerDriver();[/sourcecode]

This is actually a WebDriver object instantiation and
this will invoke the browser according to different
WebDriver implementation.

Load URL of Application Tester manually type’s in the URL
[sourcecode language=”java”]driver.get("");[/sourcecode]

Loads the given url into the browser

Click Tester clicks on the Search field in the Google home page [sourcecode language=”java”]driver.findElement(By.cssSelector("#gbqfq")).click();

Click actually comes with clear command in WebDriver.
Clear command will simply clear the input field. Basically
to avoid the auto-form fill.

Type Tester types the words manually [sourcecode language=”java”]driver.findElement(By.cssSelector("#gbqfq")).sendKeys("test");

Types “test” into the input element identified by css selector.

Select from Drop-down Tester clicks on the Drop-down field and selects the required option [sourcecode language=”java”]Select select = new Select(driver.findElement(By.tagName

Selects the text
displayed as “Apple” in the select combo box which
is identified by tag name “select”

Moving between Windows Tester will simply click on the window or will do a Alt+tab combination to toggle between windows [sourcecode language=”java”]driver.switchTo().window("windowName");

We can switch between frames or iframes using above command.

Alert Handling Tester knows that Alert will be pop-up and then asserts it. [sourcecode language=”java”]driver.findElement(By.xpath (“<Xpath>”)).click();
Alert alert = driver.switchTo().alert();

Note : Alert provides methods like accept(), dismiss(),  getText().

Browser forward/back button Tester will be clicking on the browser back and forward button [sourcecode language=”java”]driver.navigate().forward();driver.navigate().back();

Navigate back and forth in the browser

Drag and Drop Tester uses the mouse movement and drags the element to destination and drops it. [sourcecode language=”java”]WebElement source = driver.findElement("source"));
WebElement target = driver.findElement("target"));
(new Actions(driver)).dragAndDrop(source, target).perform();[/sourcecode]

Performs the drag from source to target.

Mouse Hover Tester just places the mouse over the element [sourcecode language=”java”]Actions builder = new Actions(driver);
WebElementtagElement =

Simulates the mouse hover on the element identified by id.

Check/UnCheck Tester performs this manually using mouse on the specific check boxes [sourcecode language=”java”]WebElement checking =
driver.findElement("your locator by name"));;

Performs Check/Uncheck of the check box identified by name

Select Radio button Tester performs this manually using mouse on the specific Radio button [sourcecode language=”java”]WebElement radiogender = driver.findElement(By.xpath("//input[@name=’male’]"));;

Selects the radio button identified by name as ‘male’

AssertElementPresent Tester checks whether the element is displayed [sourcecode language=”java”]assertTrue(isElementPresent(By.xpath("Some xpath")));[/sourcecode]

Checks whether element identified by XPath is present in the webpage or not.

Extract some Text from Application Tester just use the copy paste command [sourcecode language=”java”]String gettingtext =
driver.findElement(By.xpath("some xpath")).getText();[/sourcecode]

Gets the text of the element identified by xpath.

Submit a form Tester just clicks on the submit button on page [sourcecode language=”java”]driver.findElement(“your locator by id”)).submit();[/sourcecode]

Submits the form identified by id.

Hope this will help a selenium beginner, please leave your comments if any and do share

25 thoughts on “Transformation from Manual tester to a Selenium WebDriver Automation specialist !!!”

  1. Magnificent goods from you, man. I have understand your stuff previous to and you’re just too great. I actually like what you have acquired here, really like what you’re stating and the way in which you say it. You make it entertaining and you still care for to keep it smart. I can’t wait to read much more from you. This is actually a wonderful web site.

  2. Hi,
    This is really helpful.

    Just a small request – Can you please explain when/why/which cases do we use JavaScriptExecutor in WebDriver?


    • Hi Geeta,
      Good Question.

      There are some times, when the tool doesn’t perform what we wanted to do exactly.
      Example: sometimes the tool has not interacted with a page correctly, [or] has failed to react when an XmlHttpRequest returns [or] it hasn’t emitted the correct events.

      So, at this situation using the JavaScriptExecutor will be a handy workaround.

      Hope that helps.

        • Well, this is based on any particular scenario where the Selenium or WebDriver could not interact on any element in a webpage
          In Selenium RC : we used getEval() API
          In WebDriver we are using JavaScriptExecutor

          I will have to search for that functionality where it cannot interact. let me see whether I can make it as blog post itself.

  3. Really useful, thanks a lot… was searching for a list like this from a loong time, finally i found this from you.. keep going..and add more n more tuts for QA begenners. -God bless !!

  4. Hi manoj, very great work frm u, i just came across some useful selenium blogs,inorder to suggest to new selenium learners, and ur contents are really superb and its easy to understnd for new selenium learner……Keep updating manoj


Leave a Comment