• selenium webdriver commands
    Quality,  Selenium,  Webdriver

    Selenium Webdriver Commands

    Selenium Webdriver Commands There are many selenium webdriver commands use to automate a project as we have seen in my previous posts of selenium webdriver. Some of the available commands in webdriver are Browser Commands, Interactive Commands, Information Commands, String Comparison Commands, Validation Commands etc. Browser Commands: The browser commands use to open the browser, close the browser and open the website by get the url. get :- It is to open the URL of the web application.     Syntax: driver.get(“url”); quit():- It is to close the browser.     Syntax: driver.quit(); close:- It is to close the child or pop up window. Syntax: driver.close();   Interactive Commands: The interactive commands…

  • TestNG with XML
    Quality,  Selenium,  Software Testing,  Webdriver

    TestNG with XML

    TestNG with XML Framework TestNG with XML has many advantages in Selenium, as we can do parallel testing and can execute multiple test scripts of multiple classes. By the use of XML with TestNG framework we can do multi browser testing, means we can launch multiple browsers simultaneously like Google Chrome, Mozilla Firefox, Internet Explorer, Safari etc and run same script. Suppose we make test scripts for 600 test cases, but we want to run the test scripts no. 3, 258, 423 and 586 only, then in this type of scenario we will use TestNG.xml file to execute these test scripts. We can run the scripts (test methods) in user…

  • TestNG Framework in Selenium
    Quality,  Selenium,  Software Testing,  Webdriver

    TestNG Framework in Selenium

    TestNG Framework in Selenium TestNG framework in Selenium is a testing framework and the advanced version of JUnit testing framework. The limitations which are identified in JUnit, all are overcome and also given added advantages. It is an add-on to the eclipse. Also in latest version of eclipse, TestNG has been pre-installed. But if somehow it has not been installed in eclipse then I have described TestNG installation steps in eclipse below. Steps to install TestNG: Go to Eclipse >> click on Help >> Select Install New Software. Click on Add >> give name as TestNG and give the location as ‘http://beust.com/eclipse’ >> click on OK. Check the checkbox at…

  • Quality,  Selenium,  Software Testing,  Webdriver

    Frameworks in Selenium

    Automation Testing by Selenium is a bit of complex task because of the management and maintenance of the scripts. So therefore we need to use and develop the different types of frameworks in selenium webdriver. The structural way to implement the scripts for the better maintenance is known as frameworks. Maintenance means how we are implementing the automation scripts. It is easy to analyze, update, execute and analyzing the results.   Frameworks in Selenium: There are some frameworks given below: Modular Framework Data Driven Framework Keyword Driven Framework Hybrid Framework   Modular Framework: It is the basic framework and also known as Linear Framework. The application will be divided into…

  • multiple windows handling in selenium webdriver
    Quality,  Selenium,  Software Testing,  Webdriver

    Multiple Windows Handling in Selenium Webdriver

    Multiple Windows Handling in Selenium Webdriver There are many web applications which have pop up windows or child windows or multiple windows. So while Testing if we use Manual Testing then we can do the testing by operating all the windows separately. But if we want to automate this kind of scenario then we need to do multiple windows handling in selenium webdriver. Suppose there is a scenario where we have to manage multiple windows and need to navigate in all the windows for example: Open spicejet.com >> fill mandatory fields >> click on Find flights button >> now click on Currency Converter link which is available on the page…

  • script debugging
    Quality,  Selenium,  Software Testing,  Webdriver

    Script Debugging

    Script Debugging The process of executing the script step by step is known as Script Debugging. Why use the debugging? The Process of debugging is to identify the errors in runtime & also we can see the execution flow of the scripts. If any error occurs while executing the Automation Test Script, so to find the error we have to Debug the code by using the steps given below. Selenium Webdriver Script Debugging in Eclipse Steps to Run the scripts in Debug mode Add the break point by double clicking on the specific line number. From the break point onwards the Automation script will be executed Line by Line. Now…

  • JavaScript Alert in Selenium Webdriver
    Quality,  Selenium,  Software Testing,  Webdriver

    JavaScript Alert in Selenium Webdriver

    In the Web application, there are several JavaScript alert messages appear while executing the scripts or simply operating the application. So we need to know that how to handle JavaScript Alert in Selenium Webdriver. Let’s take a scenario to handle JavaScript Alert message Scenario: Write a program to verify the JavaScript alert message for any validation of any overcount. Click on OK button of JavaScript alert message. Before clicking on Ok button, take the text message which is available in the alert message and print. To handle the alert, we need to navigate from main window to alert. Then we can perform actions like either OK or Cancel. Accept: It…

  • Automation Script Implementation in Webdriver
    Quality,  Selenium,  Software Testing,  Webdriver

    Automation Script Implementation in Webdriver

    Automation Script Implementation in Webdriver: Let’s know, how to do Automation Script Implementation in Webdriver in Eclipse by using Java. Here in this article, I have implemented a Selenium Webdriver automation script of Practice form to fill for the purpose of Practice for Automation Testing. In this script, I have taken Project Name: Selenium Automation, Package name: Practice, Classname: Webdriver_Practice In this script I have used to automate Text boxes, dropdown, Multiple options select in List box, Button, Radio button, Checkbox, Image path for upload, parameterization, Google chrome browser launch etc.   package Practice.Practice; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.Select;   public class Webdriver_Practice {                                public WebDriver driver;…

  • browser launch in selenium webdriver
    Quality,  Selenium,  Software Testing,  Webdriver

    Browser Launch in Selenium Webdriver

    There are some popular browsers available, for example, Google Chrome, Mozilla Firefox, Internet Explorer, Opera, Safari etc. In this article, we will learn the Browser Launch in Selenium Webdriver. Browsers should be available in the System. To Launch the Mozilla Firefox browser latest version 45 or above, Gecko Driver should be available in the system. So we can download it from below site as per the system https://github.com/mozilla/geckodriver/releases To Launch Google Chrome, the chromedriver.exe should be available. So we can download the chromedriver.exe from below site https://sites.google.com/a/chromium.org/chromedriver/downloads To Launch Internet Explorer, the Internet Explorer Driver Server should be available. So we can download the InternetExplorerDriver.exe from the below site http://www.seleniumhq.org/download/…

  • Selenium webdriver features
    Quality,  Selenium,  Webdriver

    Selenium Webdriver Features

    Webdriver is the most popular and necessary component of Selenium for Software Testing. It is widely used for Automation Testing in IT Companies; sometimes it is called Selenium 2. The installation and Project setup is same as Selenium RC. In this article Selenium Webdriver features and its commands have been discussed below. Let’s know, what is the difference between Selenium Webdriver and Selenium RC including the advantages of Selenium Webdriver over Selenium RC? Selenium Webdriver Features: We can work with all the latest browsers like Mozilla Firefox, IE, Google Chrome, Safari, Opera. Selenium Webdriver supports the different languages like Java, C#, PHP, Ruby, Python. It is not necessary to start…