Sunday, January 31, 2016

GetAttributes, Title, Text and more.... in Selenium Webdriver

In this article, we will discuss how to extract data from elements or Page using Selenium Webdriver. Extracting attribute information and text of elements helps to validate elements have correct and expected attribute value or text.

Problem Statement of this article: 
  • How to get title of the page?
  • How to get text of an element?
  • How to get attribute value of element?

How to get title of the Page?


We can get title of the page as well as url of the current Page as shown  below: 
 WebDriver driver = new FirefoxDriver();  
 driver.navigate().to("https://www.google.com");  
 // We can get title of the page using driver.getTitle  
 System.out.println(driver.getTitle());  
 // We can get url of the page using driver.getCurrentUrl  
 System.out.println(driver.getCurrentUrl()); 

How to get text of an element in the Page?


We can get text of an element in the page using gettext() as shown in the code below:
One of the useful and important use of getText can be to get error messages displayed in page, where the class name of all the error message displayed in the page is same. It can be implemented as follows:
  • Identify the classname of the error message.
  • Using findelements, find collection of elements with class name.
  • Loop through the element collection and getText of each element.
 WebDriver driver = new FirefoxDriver();  
 driver.navigate().to("https://www.google.com");  
 WebElement elem = driver.findElement(By.id("gb_P gb_R"));  
 String message = elem.getText();  


How to use getAttribute to validate existence of an object and validating attribute properties?


Below code explains how to use getattribute to validate existence of element and extracting attribute value for the object.
 import java.io.File;  
 import java.util.List;  
 import org.openqa.selenium.By;  
 import org.openqa.selenium.WebDriver;  
 import org.openqa.selenium.WebElement;  
 import org.openqa.selenium.ie.InternetExplorerDriver;  
 
 
 public class FindAttributes {  
      static WebDriver driver;  
      @Test
  public void testing()
  { 
   driver = new FirefoxDriver();
   driver.navigate().to("https://www.google.com");
           //calling method to get names of all the links in the Page  
           textForObjectType("link");  
           // function to validate a particular object with particular text exists in the Page  
           ValidateObjectText("link", "About");       
           //   
      }  
      public static void textForObjectType(String strObj)  
       {  
           if(strObj.toLowerCase().trim().contentEquals("link"))  
           {  
                strObj = "a";  
           }  
           if(strObj.toLowerCase().trim().contentEquals("button"))  
           {  
                strObj = "button";  
           }  
     // Similarly can add object of other types. can use enum and switch for better control.
           List<WebElement> elemLink = driver.findElements(By.tagName(strObj));  
           int intLinksinPage = elemLink.size();  
           System.out.println(intLinksinPage);  
     // Loop to get attribute value of all the objects of the type in the page
           for (int i = 0;i<intLinksinPage;i++)  
           {  
                System.out.println("The name of the link " + (i+1) +" in the page is :- " + elemLink.get(i).getAttribute("text"));  
           }  
      }  
      public static void ValidateObjectText(String strObj, String ObjName)  
       {  
           if(strObj.toLowerCase().trim().contentEquals("link"))  
           {  
                strObj = "a";  
           }  
           if(strObj.toLowerCase().trim().contentEquals("button"))  
           {  
                strObj = "button";  
           }  
           List<WebElement> elemLink = driver.findElements(By.tagName(strObj));  
           int intLinksinPage = elemLink.size();  
           System.out.println(intLinksinPage);  
           for (int i = 0;i<intLinksinPage;i++)  
           {  
                if(elemLink.get(i).getAttribute("text").contentEquals(ObjName))  
                {  
                     System.out.println("Link exists in Page with text " + elemLink.get(i).getAttribute("text"));  
                }  
           }  
      }  
 }

Saturday, January 30, 2016

Xpath and css for Selenium Webdriver: Useful links and firepath

In one of the previous article, we discussed on how an element can be identified using different locators. Two of the generic element locators are using xpath and cssSelector.

Problem statement for this article:


  • What is XPath and CSS Selectors?
  • What are different tools to identify xpath or CSS for an element?
  • Common interview questions around xpath and CSS?
  • Common interview questions around xpath and CSS?
  • Some excellent reference on the web explaining how to create Xpath/CSS Selectors?

What is XPath and CSS Selectors?



Xpath
CSS Selectors
Stands for?
Xpath stands for XML Path language.
CSS stands for Cascading style sheets
Definition?
XPath is used to navigate through elements and attributes in an XML document.
CSS is a stylesheet language that describes the presentation of an HTML (or XML) document.
XPath is syntax defining parts of an XML document. Xpath uses path expressions to navigate in XML documents
CSS selectors are used to "find" (or select) HTML elements based on their element name, id, class, attribute,etc
We can traverse parent elements from child elements and vice versa using xpath.
CSS is native to browsers while Xpath is not.
Syntax
driver.findElement(By.xpath(xpathExpression));
driver.findElement(By.cssSelector(CSSExpression));
Which locator expression is more readable
In terms of readability , CSS are more readable
Which locator is comparably faster?
In various studies, it is mentioned CSS to be comparably faster than Xpath
Which locator is the best?
Since Id is believed to be unique for an element and can help uniquely identify an element, it is always best to use Id locator for object identification, if defined.

What are different tools to identify xpath or css Selector?


Using F12 or Inspect Element: 


In most of the browsers, option to inspect element is available on pressing F12. Below image shows how to inspect elements in chrome browsers to inspect an element. Similarly we can inspect element in IE browser and firefox browser.

Inspect Element in Chrome

 

Using Firepath and Firebug: 


Using FirePath with firebug, we can evaluate the css/xpath for an element as well as generate CSS/ xpath for an element as shown in the below image.FirePath is helpful with following features.

  • Generating xpath/css/sizzle for an element.
  • Evaluating xpath/css/sizzle matches elements in the html.
  • Viewing elements in the DOM tree structure.

Using Selenium IDE: 


When we record script on the AUT, all the elements recorded are identified based on element locators in the page. The test script recorded can be exported to different languages e.g: c#, Java.

The script generated can be used in tests also.


What is difference between "/" and "//" in X-path?

"/" is used to create ‘absolute’ path expressions from document node
"//" is used to create relative path expressions

Some excellent Reference materials available on understanding Xpath and CSS Selector are:


  • Understand how to create xpath and CSS Selector

Thursday, January 28, 2016

Javascriptexecutor to highlight element in Selenium Webdriver

The problem statement for this article is to highlight an element in webPage using Selenium Webdriver. Javascriptexecutor is useful concept in Selenium Webdriver with one of the use being highlighting an element in the page. You can further search down how to use javascriptexecutor in selenium webdriver to perform actions like send key operations, or executing some javascript operation:


Problem Statement:

  • What is Javascriptexecutor?
  • How to highlight an element using JavaScriptexecutor?



What is Javascriptexecutor?

  • JavaScriptexecutor is an interface providing mechanism to execute Javascript through selenium Webdriver.
  • JavaScriptexecutor is used for Javascript injection in the application
  • Through Javascript injection, we can perform different operation including sendkeys operation, clicking on an element or refreshing the html
  • There are two methods to execute javascript using Javascriptexecutor interface:
    • executeScript
    • executeAsyncScript

How to highlight an element using JavaScriptexecutor?

Below code shows how to inject javascript to highlight an element using javascriptexecutor:

 import java.io.File;  
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebDriver;  
 import org.openqa.selenium.WebElement;  
 import org.openqa.selenium.ie.InternetExplorerDriver;  
 import org.openqa.selenium.JavascriptExecutor;  

 public class HighlightElem 
 {  
      static WebDriver driver;  
      public static void main(String[] args) throws InterruptedException 
   {  
           // Connect to the Internet driver server and create an instance of Internet explorer driver.       
           File file = new File("E:\\Testing\\IEDriverServer.exe");  
           System.setProperty("webdriver.ie.driver", file.getAbsolutePath());       
           try{  
                driver = new InternetExplorerDriver();  
           }  
           catch(Exception e)  
           {  
                driver=new InternetExplorerDriver();  
           }  
           //Navigate to the webpage and identify the element to be highlighted.Change the url to valid url  
           driver.navigate().to("https://seleniumbites.blogspot.com");  
     //provide the elemet property to be highlighted
           WebElement element = driver.finndElement(By.linkText("testing"));  
           //highlight the element  
            JavascriptExecutor js = (JavascriptExecutor) driver;  
           js.executeScript("arguments[0].setAttribute('style','border: solid 8px blue')", element);   
           Thread.sleep(2000);  
           js.executeScript("arguments[0].setAttribute('style', arguments[1]);", element, "");  
           element.click();            
      }  
 } 

Wednesday, January 27, 2016

Capturing Screenshots using Selenium WebDriver or Robot class

When we create an automation framework in selenium or any automation tool, it becomes critical to report issues with screenshot in case test execution fails at any of the steps.

While automating using selenium webdriver, we can use either the Webdriver class or the Robot class to create method for capturing screenshot.

Below code explains both the methods to capture screenshot in Selenium Webdriver.

 package Selenium;  
 import java.io.BufferedWriter;  
 import java.io.File;  
 import java.io.FileWriter;  
 import java.io.IOException;  
 import java.awt.Rectangle;  
 import java.awt.Robot;  
 import java.awt.image.BufferedImage;  
 import javax.imageio.ImageIO;  
 import org.apache.commons.io.FileUtils;  
 import org.openqa.selenium.OutputType;  
 import org.openqa.selenium.ie.InternetExplorerDriver;  
 public class CaptureScreenshot  
 {  
      public static void CaptureScreenshotWebDriver(WebDriver driver,String filePath)  
           {  
           try   
                {  
                     Thread.sleep(20000);  
                     File srcFile= ((InternetExplorerDriver) driver).getScreenshotAs(OutputType.FILE);                      
                     FileUtils.copyFile(srcFile, new File(filePath),true);       
                }   
           catch (Exception e)   
                {  
                     // TODO Auto-generated catch block  
                     e.printStackTrace();  
                }  
           }  
      public static void CaptureScreenshotRobotClass(String filePath)  
           {  
           try  
                {  
                     Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());  
                     BufferedImage capture = new Robot().createScreenCapture(screenRect);  
                     ImageIO.write(capture, "jpeg", new File(filePath));                                                    
                }   
           catch (Exception e)   
                {  
                     // TODO Auto-generated catch block  
                     e.printStackTrace();  
                }  
           }  
 }  

Tuesday, January 26, 2016

Selenium WebDriver Waits : Explicit Vs Implicit

 During test execution, we may require test execution to wait for a particular period of time. The time to wait may depend on following factors:

  • Waiting for specific process to complete, which can be waiting for some condition in the database or some external process to complete.
  • Waiting for specific objects/Page to load completely.
  • Waiting for specific object to be enabled or disabled.
  • Failure in automation execution due to exceptions for objects being not available in the DOM.

Problem Statement of this article

  • What are different types of waits in Selenium WebDriver.
  • What are implicit waits, explicit waits in selenium.

What are different types of waits in Selenium WebDriver?

The different types of waits, we can use in Selenium WebDriver are:

  • Implicit Waits.
  • Explicit Waits
  • Hard Coded waits using thread.sleep

What are implicit Waits?

  • Implicit wait is not defined for specific object but checks for the existence of each element used and are implied until the driver instance is closed.
  • Implicit waits will wait for element to appear in the Document Object Model.

    • Implicit wait once set remains for the instance of WebDriver object.
    • Implicit wait tells Webdriver to poll the DOM for a certain amount of time to wait for availability of object.
    • In case object is found before the set wait time, it will move to the next step in the script.

    WebDriver driver = new InternetExplorerDriver();  
    driver.manage().timeouts().implicitlyWait(150, TimeUnit.SECONDS);  

    What are Explicit waits?


    • Using Explicit waits,execution of code is paused to wait for specific condition to be satisfied, before continuing with further execution.
    • We can provide explicit wait by using WebDriverWait and providing expected conditions.
    • There are two types of explicit waits in Selenium Webdriver
      • WebDriverWait
      • Fluent Waits

    How are fluent Waits implemented in selenium webdriver?

    Below code explains how fluent waits are implemented in selenium webdriver.

    FluentWait<WebDriver> flwait = new FluentWait<WebDriver>(driver);  
    //define the maximum time for the object to be available  
    flwait.withTimeout(5000, TimeUnit.MILLISECONDS);  
    // define the poll time for object to be loaded.  
    flwait.pollingEvery(400, TimeUnit.MILLISECONDS);  
    driver.get(url);  
    flwait.until(ExpectedConditions.titleContains("qaautomationqtp.blogspot.in"));  
    //We can also define to ignore specific types of exceptions while using fluent waits.  
    flwait.ignoring(NoSuchElementException.class); 

    How are WebdriverWait implemented in Selenium Webdriver?

    WebdriverWait is an extension of fluent class but has less functionality compared to fluent class for waiting for an object including pooling time and ignore settings.

     WebDriverWait wdwait = new WebDriverWait(driver, 50)  
     wdwait.until(ExpectedConditions.elementToBeClickable(By.Id(“Loginbtn")));  

    How to hard code the pause time for execution?

    Thread.sleep – This is hard code wait. Execution will pause for the time provided as argument in thread.sleep

    For e.g.: Thread. Sleep (10000) will make the script pause for 10 sec. Thread.sleep is useful for waiting for some external processes to complete. e.g: Interaction with database.
    If used, thread.sleep should be used with while loop with small time for wait in each of the loop.

    What are different expected conditions for which we can define explicit waits?

    Below  are the different ways to use expected condition based on which we can add explicit wait in the object.


    a. presenceOfElementLocated - Verify presence of element in the DOM.

    WebDriverWait wbwait = new WebDriverWait(driver, 1000);
    wbwait.until(ExpectedConditions.presenceOfElementLocated(By.linkText("Testing"))); 

    b. Using elementToBeClickable – verify element is present and clickable


    wbwait.until(ExpectedConditions.elementToBeClickable(By.linkText("Testing")));

    c. Using invisibilityOfElementLocated

    wbwait.until(ExpectedConditions.invisibilityOfElementLocated(By.linkText("Testing")));

    d. invisibilityOfElementWithText - Validating the invisibility of element with text for the element provided.

    wbwait.until(ExpectedConditions.invisibilityOfElementWithText(By.xpath("//div[@id='_ttE']"), " Testing ")); 


    e. textToBePresentInElement - Validating the text to be present in the element defined by locator.

    wbwait.until(ExpectedConditions.textToBePresentInElement(By.xpath("//div[@id='_tt545']")," Testing")); 

    f. visibilityOfElementLocated by locator.

    wbwait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[@id='_tt5433']"))); 

    g. titleContains - Wait until the title is displayed correctly

    wbwait.until(ExpectedConditions.titleContains("Testing"));

    h. alertIsPresent - waits for alert to appear in the window.

    wbwait.until(ExpectedConditions.alertIsPresent());


    Protected Mode Settings different for different zones: Common issues Selenium Webdriver

    During automation using Selenium Webdriver, we face challenges during execution of automation tests or during script creation. In this series of articles, we will discuss on different challenges/problems in Selenium Automation specific to Internet explorer.

    Problem Statement : Protected Mode Settings different for different zones


    ProblemGet following error on launching the IE browser:

    Exception in thread "main"org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information).





    Solution:  Well, the exception in this case tells the solution itself, i.e to set protected mode as enabled or disabled for all the internet zones. Below are the steps to set protected mode settings in internet explorer.



    • Navigate to internet Options>Security.
    • For all the internet zones, Internet, Local Intranet , Trusted Sites, and Restricted sites, Keep the protected mode settings same for all the zones. Either keep them protected mode as enabled or disabled.



    Monday, January 25, 2016

    Object Identification in Selenium Webdriver.

    Object Identification means identifying objects in the page on which actions needs to be performed. Selenium provides methods and different element locators to work with objects, which will be discussed in this article.

    In this article, we will explain how to identify an object in Selenium Webdriver, about different element locators used for object identification. At the end of this article, we should have answers to below problem statements.


    Problem Statements to be covered in this article:


    1. How to use findElement or findElements for object Identification.

    2. What are the different element locators(By methods) by which an object can be identified in Selenium Webdriver.

    3. What are some useful tools for object identification.


    How to identify an element in HTML:
     


    We can identify an element or collection of elements in the HTML document object model based on attributes value for the object. e.g: Using Id, tagname, xpath or CSS for the object. Using tools like firebug/firepath or selenium IDE, we can identify the unique properties by which an object can be identified in HTML DOM. In case of chrome/IE browser, pressing F12 button will open the HTML structure and can help uniquely identify the objects.



    Using Firefox for object Identification


    Using FirePath:


    Above image shows how to use FirePath in firebug for firefox browser. Firepath helps to evaluate the xpath and css for an element. This is a very useful plugin in firefox and highly helpful in identifying the unique property of object in the webpage. 

    In the above image, we are trying to identify the input box in google Page. The xpath provided by us uniquely matches the input box in the page as shown by "1 matching node" in the footer bar. 
    Another way to identify the unique attribute for webelement is using Selenium IDE which will be discussed in another article.


    Different Element Locators:


    The various element locator used to identify an element or collection of elements in Selenium Webdriver are:

    • By.ClassName
    • By.id 
    • By.cssSelector
    • By.xpath
    • By.tagName
    • By.linkText
    • By.PatialLinkText
    • By.name

    findElement and findElements:


    • Unique element Vs Collection of elements: When we use findelement, the first object matching the criteria provided by element locator is considered as the WebElement, whereas in case of using findElements, a collection of webElements is returned. Even in case a single object is returned in the collection, it will be stored in list element.
    • Actions like click, sendkeys, submit are performed on webelement. 
    • FindElements are useful in case of performing actions on similar objects.For example:
      • To identify the number of links in the Page.
      • To identify multiple error messages displayed in Page based on the class name of error messages.
      • Selecting multiple checkboxes in the Page.

    Below code shows how to use findElements and findElements to identify objects in the Page.

    package testingqaautomation;
    
    import java.util.List;
    import org.junit.Test;e page
    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.firefox.FirefoxDriver;
    
    public class testingclass {
     
    @Test
    public void testing()
    {
     WebDriver driver = new FirefoxDriver();
     driver.navigate().to("https://qaautomationqtp.blogspot.in");
            //Using findElements gives a collection of elements. 
     List <WebElement> elemlist = driver.findElements(By.cssSelector("a"));
     System.out.println("there are "+  elemlist.size()+" links in the page");
     
      for(WebElement elem:elemlist){  
          System.out.println(elem.getText());  
          //using findElement, we find a unique object matching the citeria.
          driver.findElement(By.linkText("Login")).click();
        }  /
    }
    }
    

    Sunday, January 17, 2016

    Selenium code to work with different browsers

    In this article on Selenium codes, we will explain how to create a function to run test on different browsers using selenium webdriver in Java.

    In each of the examples explained in selenium code series, we will define a problem statement, Pre-condition and then the solution for the problem:


    Let us start with the first problem :


    Problem Statement: We need to create a generic function to create an instance of webdriver in different browsers and perform following actions:


    1. Launch the application in one of the browser from IE, Firefox and chrome.

    2. Navigate to the web application.

    3. verify the title for the Page.


    Pre-condition :

    1. The jar files for selenium should be downloaded and added as external file in the build path for the project.

    2. Server exe files for chrome and internet explorer and downloaded.


    Below code explains how to create a method using selenium webdriver for launching different browsers.

    import java.io.File;
    import org.openqa.selenium.*;
    import org.openqa.selenium.firefox.FirefoxDriver;
    import org.openqa.selenium.ie.InternetExplorerDriver;
    import org.openqa.selenium.remote.DesiredCapabilities;
    import org.openqa.selenium.chrome.ChromeDriver;
    import org.openqa.selenium.chrome.ChromeOptions;
    
    
    public class Testingbrowser {
     
    //Define the Webdriver Object driver. Defining this globally can help this driver to be used in the methods in the class
       WebDriver driver;
    
    //This is the main method where we will call other methods in the test.   
     public static void main(String[] args) throws InterruptedException
     { 
      //There are two part in the flow for which we created the required methods 
      Testingbrowser Tb = new Testingbrowser();
      //provide the name of browser to run test in
      Tb.LaunchBrowser("chrome");
      //Call the functon to launch the application and validating the title of application
      Tb.LaunchAppandValidate("https://seleniumbites.blogspot.com", "Selenium WebDriver Automation concepts");
     }
     
     
    //Function to launch required browser 
     public void LaunchBrowser (String strBrowser)
     {
    //Using an if else loop to launch the required browser, we will provide value from ie, chrome, and firefox.
    // We can also use enum to provide the browser name in the test.
      if (strBrowser.trim().toLowerCase().contentEquals("ie"))
      {
    //Provide the file path for IE Server
       File file = new File("D:\\Selenium_Automation\\IEDriverServer.exe");
       System.setProperty("webdriver.ie.driver", file.getAbsolutePath()); 
       driver = new  InternetExplorerDriver();
      }
    
      else if (strBrowser.trim().toLowerCase().contentEquals("firefox"))
      {
       driver = new  FirefoxDriver();
      }
      else if (strBrowser.trim().toLowerCase().contentEquals("chrome"))
      {
    //Provide the file path for Chrome drive
           System.setProperty("webdriver.chrome.driver", "D:\\Selenium_Automation\\chromedriver.exe");
           DesiredCapabilities capabilities = DesiredCapabilities.chrome();
           ChromeOptions options = new ChromeOptions();
           options.addArguments("test-type");
    //Provide location where chrome is currently installed.  
           String Chrome_Path = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe";
           capabilities.setCapability("chrome.binary",Chrome_Path);
           capabilities.setCapability(ChromeOptions.CAPABILITY, options);
           driver = new ChromeDriver(capabilities);
      }
      else
      {
    //In case browser name in not from the list, print the below message
         System.out.println("Please select a browser from IE/Firefox or chrome");
      }
    
     }
     
    //Function to perform required action on the application 
     public void LaunchAppandValidate(String url, String strTextinTitle)
     {
      try
      {
    //open the required url 
             driver.get(url);
    //once the url is launched, verify the title contains the required text.
    //Note : In case we require exact match , we will use contentequals instead of contains
       if (driver.getTitle().contains(strTextinTitle))
       {
             System.out.println("Title of the Page contains text :" + strTextinTitle );  
       }
       else
       {
             System.out.println("Title of the Page does not contains text :" + strTextinTitle );  
       }
      }
      catch(Exception e)
      {
            System.out.println(e.getClass());
      }
     }
     
    }
    

    Sunday, January 10, 2016

    Selenium WebDriver: Understanding the basics

    If we talk about chemistry, Selenium is a chemical element with atomic number 34, crystalline non-metal with semiconductor properties. But since we are planning to discuss automation selenium instead of chemical selenium, this article will take a turn from chemistry to software automation. 


    Before going through advanced topics on selenium automation, we should understand what is Selenium WebDriver and how to use Selenium WebDriver in automation.


    Selenium WebDriver is a collection of language specific bindings to drive a browser. Languages supported by Selenium WebDriver are:

    • Python
    • Ruby
    • C#
    • Java
    • Perl
    • php
    • javascript 


    The browsers that selenium Webdriver is able to drive includes:

    • Google Chrome
    • Internet Explorer 6, 7, 8, 9, 10
    • Firefox
    • Safari
    • Opera
    • HtmlUnit
    • phantomjs
    • Android (with Selendroid or appium)
    • iOS (with ios-driver or appium)

    In case, we are looking to automate web application using selenium WebDriver in Java, We will use bindings for selenium in Java in the form of Jar files, which can be downloaded from selenium website.We need to build up project in Java and design the framework. Selenium Webdriver jar files are used to identify objects in the web application. Rest of the framework functions for e.g: methods for reading excel files, working with database or automating window application, we will use other bindings/tools, for e.g : jxl.jar is used for reading excel files and twin/AutoIt for identifying objects in the windows application. Similarly in case of c#, we will use the dll for selenium Webdriver.


    There are different testing frameworks which can be used to automate the application, e.g: TestNG, Junit testing framework for creating automation framework in JAVA, Nunit framework with c# or creating BDD framework using spec-flow and cucumber.Similarly we can create custom frameworks with features from different frameworks. Framework used for automation should be robust, reliable, maintainable, and scalable. 


    There is record and play tool known as Selenium IDE which can be added as plugin to firefox.
    If you require to leverage language features, it is recommended to create a framework in Selenium WebDriver, though for quick replication, we can create a test in Selenium IDE. There are different features in Selenium IDE which are very useful one of which being exporting test in different languages.


    This first post in this blog on selenium automation was like a warm up session before going and understanding in-depth concept in Selenium Automation. I too not being a veteran in selenium automation will share the information as I learn in this blog. Selenium is the biggest star in software automation at the moment, So would request readers to work with selenium, it being an open source bindings/tools. 

    An excellent source amongst many on the web, I found to start working with selenium is series of videos by execute automation explaining how to work with selenium in c#: