• 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…

  • java basics for selenium
    Quality,  Selenium,  Software Testing

    Java Basics for Selenium

    Software Testing is very essential process of Software development life cycle. Basically there are two types of software testing conducts on any software, first is Manual software testing and second is Automation software testing. Automation testing is useful to accelerate the Testing process and for automation we use various tools like Selenium, Apache Jmeter, Sikuli, QTP, Appium, Selendroid etc. Selenium is a most famous and open source tool to automate the web applications but to use this tool we need to know some java basics for selenium, so that we can implement the automation scripts to execute the test cases. Java Basics for Selenium Java is most famous scripting language…

  • 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…

  • 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…

  • Selenium RC Programmes
    Quality,  Selenium,  Selenium RC,  Selenium RC programmes

    Selenium RC Programmes

    There are some Selenium RC Programmes given here: Ques: Write a program to Login into Facebook? Program: Package SeleniumRC; Import com.thoughtworks.selenium.default selenium; Public class facebook_login { Public static void main (string [] args) { // to do auto-generated method stub Default Selenium  Selenium = new Default Selenium (“local host”, 4444, “*firefox”,” https://www.facebook.com/”); Selenium.start ();     //Launch browser Selenium.open (“https://www.facebook.com/”);  //enter and open the given url Selenium.window maximize();   //it will maximize the window screen to the full width. Selenium.type (“email”, example@email.com);   //enter the given credential in Email field. Selenium.type (“pass”, example);   //enter the given credential in Password field. Selenium.click(“u_0_2”);   //this command is for the click on the Log In Button. } }…

  • Selenium RC Specification
    Quality,  Selenium,  Selenium RC,  Selenium RC Specification

    Selenium RC Specification

    Selenium RC is a component of Selenium often called Selenium-1. RC stands for Remote Control, it acts as a Server and launches browsers but one browser at a time. Selenium RC supports multiple browser like Google Chrome, Mozilla Firefox, Safari, IE etc. also it supports multiple scripting languages like Java, PHP, C#, ruby, Perl, Python etc.  The Selenium RC Specification is given below: SELENESE The selenium commands often called as Selenese. Browser command Start: It is to launch the browser. Open: It is to open the URL of the application. Window maximize: It is to maximize the window. Stop: It is to close the browser. selenium.stop( ); Close: It is…

  • Steps for creating a project in Eclipse
    Quality,  Selenium,  Selenium Configuration

    Steps for creating a project in Eclipse

    The steps for creating a project in Eclipse for the Automation Testing using Selenium are given below: Create a project by navigating to File >> New >> Select project. Select the Java Project Give the project name ‘Selenium or any name’. Select 1.6/1.7/1.8 from dropdown Use an execution environment JRE then click on finish. Click on Yes to continue the setup Expand the Selenium Automation Project– Right click on JRE system library– Click on Build path and select Configure build path. Click on Add External JARs – select selenium server standalone jar file from library folder then click on ‘Open’ and ‘Ok’. Go to ‘Run’ click an ‘External Tools’ and select ‘External…

  • Selenium Configuration with Java
    Selenium,  Selenium Configuration

    Selenium Configuration with Java

    Selenium configuration with Java to write Selenium RC & Selenium Webdriver programmes. We need below files to configure: Eclipse (Latest version needed) JDK or JRE 6/7/8 version or (Latest version needed) Selenium-Server-Standalone-2.48.0 jar or  (Latest version needed)  Eclipse- It is an editor to write the test scripts or programmes. Eclipse is standalone file (folder) not necessary to install it. To open Eclipse JDK or JRE should be installed in your system. Install the Eclipse IDE for EE developers.   JDK or JRE: JDK stands for ‘Java Development Kit’ and JRE stand for ‘Java Runtime Environment’ both are nothing but Java. Go to the path program files Java –“C:\program files\java”. Check…

  • Selenium IDE
    Quality,  Selenium,  Selenium IDE

    Selenium IDE

    The first component of Selenium is Selenium IDE, in which IDE stands for Integrated Development Environment. This IDE is for Record and Run the test scripts, it is an Addon for Firefox (FF) & it can be installed in Firefox browser only. It is accountable for User’s action and for every action it will generate the scripts. The recorded scripts initially will display in HTML language. If required then we can convert to the other languages also. The recorded scripts can be run against the other browsers also with the help of RC or Webdriver. Steps to Install Selenium IDE: Launch the Mozilla Firefox browser and open the below URL…