What is a frame?

Frame is just like as a container where few elements can be grouped.

How to identify frame inside a webpage?

There are different ways to identify frame inside a webpage

Way 1:

  • Open webpage in a browser.

webelement in a webpage

  • Right click on webelement in a webpage

frame inside a webpage

Way 2:

  • Open webpage in a browser.
  • Right click on webelement in a webpage
  • Open source code(Html Code) of the webpage by clicking inspect element with firebug option see below image.

iframe source code

How to handle an element inside the frame?

There are 4 ways to handles frames in selenium webdriver.

Switch to frame by using index :

Method 1 :

Suppose if there is single frame in a webpage then we can switch to the iframe by using index.

Here is the sample code:

Syntax : driver.switchTo().frame(int index);

Example : driver.switchTo().frame(0);

Note : By default single frame index value ‘ 0’.That means when webpage has  only one frame then the index will be zero.

Method 2 :

Suppose if there are 3 frames in a webpage then we can switch to the iframe by using index.

Here is the sample code:

Syntax :

List<WebElement> framelist=driver.findElements(By.tagName(“iframe”));

driver.switchTo().frame(framelist.get(int index));

Example :

List<WebElement> framelist=driver.findElements(By.tagName(“iframe”));

//switchTo 1st frame by using index

driver.switchTo().frame(framelist.get(0));

  //switchTo 2nd frame by using index

driver.switchTo().frame(framelist.get(1));

//switchTo 3rd frame by using index

driver.switchTo().frame(framelist.get(2));

Switch to frame by using Id or Name :

We can also use Name and Id attributes of iframe  through which we can switch to iframes.

Here is the sample code:

Syntax 1:

driver.switchTo().frame(“Id of  the element”);

Html code :

iframe html code

                                                                                  Example : driver.switchTo().frame(“rightMenu”);

Syntax 2:

driver.switchTo().frame(“Name of  the element”);

Html code :

iframe html code

                                                                              Example : driver.switchTo().frame(“rightMenu”);

Switch to frame by using WebElement :

We can also switch to the frame using webelement.

Here is the sample code:

Syntax :

driver.switchTo().frame(WebElement);

Html code :

iframe html code

Example : driver.switchTo().frame(driver.findElement(By.name(“rightMenu”)));

How to get all the frames in a webpage ?

get all the frames in a webpage

Html code :

Open notepad and type the below Html code and save as frames.html

<html>

<body>

<iframe src=”http://www.seleniumhq.org/download/” width=”200″ height=”200″ name=”selenium”>

<p>Your browser does not support iframes.<p>

</iframe>

 

<iframe src=”http://127.0.0.1/orangehrm-2.5.0.2/login.php” width=”200″ height=”200″ name=”selenium”>

<p>Your browser does not support iframes.<p>

</iframe>

<br>

<iframe src=”http://testng.org/doc/index.html” width=”200″ height=”200″ name=”selenium”>

<p>Your browser does not support iframes.<p>

</iframe>

<br>

<a class=”gb_P” data-ved=”0EMIuCBMoAA” href=”https://mail.google.com/mail/?tab=wm” data-pid=”23″>Click on Gmail</a>

</body>

</html>

 

Example :

package seleniumProject;

import java.util.List;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

public class getTotalFrames {

public static void main(String[] args) {

//   Open Firefox Browser  

       WebDriver driver = new FirefoxDriver();

 //   Open AppURL In Browser

driver.get(“file:///C:/Users/Hanumanthu/Downloads/frames.html”);

 // count all the frames on a webpage

List<WebElement> total_frames=driver.findElements(By.tagName(“iframe”));

System.out.println(total_frames.size());

//close the current browser window

driver.close();

}

}

How to verify TestNg text inside 3rd frame?

verify TestNg text inside 3rd frame

Selenium Sample Code :

package seleniumProject;

import java.util.List;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

public class getTotalFrames {

public static void main(String[] args) {

   // Open Firefox Browser  

WebDriver driver = new FirefoxDriver();

//  Open AppURL In Browser

driver.get(“file:///C:/Users/Hanumanthu/Downloads/frames.html”);

 //count all the frames on a webpage

List<WebElement> total_frames=driver.findElements(By.tagName(“iframe”));

System.out.println(total_frames.size());

 //Switch to 3rd Frame by using Index

driver.switchTo().frame(total_frames.get(2));

  //Identify and get the text and store into testNg_text variable

String testNg_text=driver.findElement(By.xpath(“html/body/h2[1]”)).getText();

   //print the text from 3rd frame

System.out.println(testNg_text);

  //verify the text from 3rd frame

if(testNg_text.equals(“TestNG”))

{

System.out.println(“TestNG text verified successfully”);

}else

{

System.out.println(“TestNG text not verified successfully”);

}

 //How switch back to main window from inside any frame ?

driver.switchTo().defaultContent();

//Close the Firefox Browser

driver.close();

}

}

Note :

switch back to main window from inside any frame

1. Switch to 3rd Frame by using Index

Syntax :   driver.switchTo().frame(total_frames.get(index));

Example :   driver.switchTo().frame(total_frames.get(2));

2.Switch to 3rd  Frame by using Id

Syntax :   driver.switchTo().frame(“Id of the element”);

Example :   driver.switchTo().frame(“selenium”);

If no id then go for Name.

 3.Switch to 3rd  Frame by using Name

Syntax :   driver.switchTo().frame(“Name of the element”);

Example :   driver.switchTo().frame(“selenium”);

4.Switch to 3rd  Frame by using WebElement

Syntax :   driver.switchTo().frame(WebElement);

Example :   driver.switchTo().frame(driver.findElement(By.name(“selenium”);

 How switch back to main window from inside any frame ?

Syntax : driver.switchTo().defaultContent();

 How to handle frame in selenium webdriver using java

TestSteps:

Open Firefox Browser

Open AppURL In Browser

Get the Title of WebPage

Verify Title of WebPage

Enter the username

Enter the password

Clicking On Login Button

Identify and get  the Welcome selenium text

Verify  Welcome selenium text

Switch to frame

Handle DropDown in Selenium

  1.  How to print all the dropdown values
  2. How to Select the dropdown value inside a frame
  3. verify selected value from dropdown
  4. How to Verify dropdown values

Again switch back to main window from frame

Clicking On Logout Button

Close the Firefox Browser

Selenium Code :

package com.tests;

import java.util.List;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

importorg.openqa.selenium.support.ui.Select;

public class OrangeHRM_login {

public static void main(String[] args) throws Interrupted Exception {

// open the firefox browser

WebDriver driver = newFirefoxDriver();

// navigate the AppUrl

diver.get(“http://127.0.0.1/orangehrm-2.5.0.2/login.php”);

//Get the Title of WebPage

String title=driver.getTitle();

//print the title of the webpage

System.out.println(title);

//Verify Title of the WebPage

if (title.equals(“OrangeHRM – New Level of HR Management”)) {

System.out.println(“title is verified successfully”);

} else {

System.out.println(“title is not verified successfully”);

}

// Enter the username

  driver.findElement(By.name(“txtUserName”)).sendKeys(“selenium”);

// Enter the password

driver.findElement(By.name(“txtPassword”)).sendKeys(“selenium”);

// Clicking On Login Button

driver.findElement(By.name(“Submit”)).click();

// Identify and get  the Welcome selenium text and store into text variable

String text = driver.findElement(By.xpath(“//*[@id=’option-menu’]/li[1]”)).getText();

// Print the welcome selenium text

System.out.println(text);

//  To verify whether the welcome page successfully opened or not

if (text.equals(“Welcome selenium”)) {

System.out.println(“Welcome selenium is verified successfully”);

} else {

System.out.println(“Welcome selenium is not verified successfully”);

}

// Switch to Frame by ID

driver.switchTo().frame(“rightMenu”);

System.out.println(“****How to print all the dropdown values inside a frame****”);

Identify the dropdown

// Identify the dropdown

WebElement dropdown = driver.findElement(By.id(“loc_code”));

// Identify  dropdown values  and store into droplist  variable

List<WebElement> droplist = dropdown.findElements(By.tagName(“option”));

// How to print all the dropdown values

for (inti = 0; i<droplist.size(); i++) {

System.out.println(droplist.get(i).getText());

}

System.out.println(“*****How to Select the dropdown value inside a frame*****”);

Select the dropdown value inside a frame

/*

                    If u want to select the dropdown value then we need to create the select object for that dropdown

                    */

Select s = new Select(dropdown);

// Select the dropdown value by using index

s.selectByIndex(2);

//s.selectByVisibleText(“Emp. First Name”);

//s.selectByValue(“1”);

System.out.println(“****verify selected value from dropdown inside a frame *****”);

verify selected value from dropdown inside a frame

//get the selected value and store into selected_value variable

String  selected_value=s.getFirstSelectedOption().getText();

//print selected value

System.out.println(“selected_value  :”+selected_value);

//verify selected value from dropdown

if (selected_value.equals(“Emp. First Name”)) {

System.out.println(“selected value  verified successfully”);

} else {

System.out.println(“selected value not verified successfully”);

}

// How switch back to main window from inside any frame

driver.switchTo().defaultContent();

// Clicking On Logout Button

driver.findElement(By.xpath(“//*[@id=’option-menu’]/li[3]/a”)).click();

// Close the Firefox Browser

driver.close();

}

}

Click here: How to verify multiple checkboxes in a webpage using selenium?

Click here: Steps to configure Selenium WebDriver with java to develop test scripts

Selenium Training in Hyderabad

Kosmik Technologies is on of the best selenium training institutes in Hyderabad. We are providing lab facilities with complete real-time training. Training is based on complete advance concepts. So that you can get easily “hands-on experience”. We will give 100% job assistance.

Selenium Architecture| Best Selenium Grid Testing Centers in Hyderabad

 

 

Best Selenium Grid Testing Centers in Hyderabad

Selenium Grid Architecture

 

A Selenium Grid is a method of testing using Selenium. That enables testing on different devices running different operating systems and browsers machines parallel

 

Quick Explanation

 

Selenium GRID creates a network of HTTP servers. There are two roles

  1. Hub
  2. Node

 

Hub

 

It is the orchestrator. That takes incoming payload. That contains a request for a certain configuration of the browser. The grid has a node, which matches the browser configuration request in the payload. The hub establishes a session the script commands execute on that browser. If there is no match, then hub returns an error.

 

 

Node

 

It registers to a hub with a certain list of the browser. There are many configuration options we talk in detail. A node can have many instances of browsers.

 

Architecture and Workflow

 

Local/Web Driver Execution

 

 

We execute a selenium script on a local box. This flow represents local execution, otherwise Web Driver execution

  • Our code (Ruby, Java, c# whatever) communicates with Selenium Web Driver. The Browser specific client driver that acts as HTTP proxy.
  • A session created and then the HTTP request and response communication happen. The request is asking to click, set text etc. Response is getting the result of each command, get text, results of execution
  • The difference between Selenium RC [Selenium 1.0 and earlier] and Web Driver. That Web Driver makes native browser calls whereas RC injects JavaScript into the browser executed

 

 

 

selenium_webdriver

 

 

A little more details

 

 

 That explains the HTTP calls that happen between the code – Web driver – Browser. The AUT (application under test) URL of the application will load into the DOM of the browser. Once a session establish. After the session create communication between in the same path

 

selenium-rc_architecturepng

RemoteWebDriver / GRID Execution

 

 

 The beginning to set up a GRID and another Remote Web Driver. API to consume the capabilities offered by the grid

 A GRID set up already with the browser combinations as mentioned in each Node. Without going into too many details, here are the basic steps to be able to work with a GRID

  1. Versions of browsers required for your cross-browser testing.  A Matrix with the parameters [Browser, version, platform]
  2. Install the browsers on different machines [GRID nodes]
  3.  The Web Drivers (chromedriver.exe, IEdriverServer.exe…) available in environment PATH
  4. Start the Selenium GRID HUB on a machine.
  5. Start and register all GRID nodes to the HUB.
  6.  We should have a Selenium GRID up and running.
  7.  The automation code uses RemoteWebDriver API.   The Desired Capabilities object values [You can use any supported language Ruby, Java, C# ….]
  8. The RemoteWebDriver API will have a URL that points to the GRID HUB.
  9. That is Once executed, it starts on the node that matches the requested browser

 

 

 

overall_grid_architecture

 

  • JSON over the wire:

     

    JSON messages hold the entire information. That required by the server and instead of RPC. Plain JSON messages exchange between server and client. Also referred to as Web Driver protocol

 

  • Desired Capabilities

    The Object in automation code that has requesting browser configuration information

 

  • RemoteWebDriver

    The object in automation code. that knows how to communicate with Web Driver / Selenium GRID

 

Best Selenium Grid Testing Centers in Hyderabad:

 Kosmik Technologies is the Best Selenium Grid Centers in Hyderabad. we offer online and offline Selenium.

 

Selenium Web Driver Architecture

Selenium WebDriver Training Centers in Hyderabad Kphb

 

 

Introducing Web Driver

 

 

The primary new feature in Selenium 2.0 is the integration of the Web Driver API. It provides a simpler. More programming interface also to addressing some limitations in the Selenium-RC API. This is support dynamic web pages. Where elements of a page may change without the page itself reloaded. Web Driver’s goal is to supply a well-designed object-oriented API. That provides improved support for modern advanced web-app testing problems

 

The biggest change in Selenium recently has been the inclusion of the Web Driver API

 

Selenium Web Driver fits in the same role as RC. It has incorporated the original 1.x bindings. It refers to both the language bindings and the individual browser controlling code. This referred to as just “Web Driver”.

Selenium 1.0 + Web Driver = Selenium 2.0.

 

  • Web Driver is a compact Object Oriented API when compared to Selenium1.0
  • It drives the browser much more and overcomes the limitations of Selenium 1.0. the file upload or download, pop-ups, and dialogs barrier like
  • Web Driver overcomes the limitation of Selenium RC’s

 

 

Selenium web driver architecture has three parts

 

  1. Language level bindings
  2. Selenium Web driver API
  3. Drivers

 

 

 

1)Language Level Bindings:

 

 
 The Left-hand side here we’ve got some bindings. These are language level bindings of Selenium web driver code. These languages are making a framework.   Interact with the Selenium Web driver and work on various browsers and other devices. So we have a common API that we use for Selenium that has a common set of commands.  We have various bindings for the different languages.  There’s Java, Java, Python, Ruby. There’s also some other bindings and new bindings can add manner.

 

 

2) Selenium Web Driver API:

 
 These bindings communicate with Selenium Web driver API.  This API sends the commands taken from language level bindings interpret. It and sent it to the Respective driver. Right now don’t worry about how it works. I will explain them in upcoming posts.  It contains a set of the common library. This allows sending the command to respective drivers

 

3) Drivers:

 
The Drivers here at the right-hand Side.  We have various internet browser specific drivers. Such as IE driver, a Firefox, Chrome, and other drivers such as HTML unit which is an interesting one. It works in the headless mode in text execution faster. It also contains mobile specific drivers as well. But the basic idea here is that each one of these drivers knows how to drive the browser. It corresponds to the Chrome driver knows to handle the low-level Chrome browser. It like clicking the button, going into pages, getting data from the browser itself. The same thing for Firefox, IE, and so on.

 

Selenium WebDriver Training Centers in Hyderabad Kphb:

 

 

Learn Selenium from certified trainers. Advanced Selenium training from real-time experts in Hyderabad.Kosmik Provides Online Selenium  WebDriver Training Centers in Hyderabad Kphb.

 

AutoIT with Selenium | Selenium Coaching in Kukatpally

Selenium Coaching in Kukatpally

AutoIT with Selenium

 

Selenium is an open source tool that is design by automates web based applications. But to handle window GUI and non HTML popup in application. AutoIT is must as this Selenium doesn’t handle by window based activity.

AutoIt v3 is freeware. The combination of mouse movement, keystrokes and window control manipulation. To automate a task which is not possible by selenium web driver.

AutoIt Features

 

1) Easy to learn

2) Simulates keystrokes

3) Simulate mouse movements

4) Scripts can be compiling into standalone executable

5) Windows Management

6) Windows Controls

7) Detailed help file and large community

In short, any windows, mouse & keystrokes simulation. Which we cannot handle with Selenium that can handle with AutoIt. All we need to do is to use the script in Selenium which is generating with the help of AutoIt tool.

Moving ahead we will learn how to upload a file in selenium web driver using autoIT. Here we need three tools in to this.

  • Selenium Web driver
  • AutoIT editor and element identifier
  • The window that you want to automate

 

How to AutoIT download and install

 

1): Go to this link.

2): Dropdown on ‘Autoit’ and ‘Autoit Editor’ Hover.

 

2

 

 3) Click ‘AutoIT’ Downloads option.

 

3

 

 4): Download “Autoit” and then clicking on ‘Download Autoit’ button

 

4

 

5): Now download “Autoit editor” by clicking on ‘Downloads’ button.

 

5

 

 6): Click on the link as display below.

 

6

 

After download you will get two setup file as shown in below screen, first one is AutoIt version 3 setup. Second one is Scitautoit3.

 

7

 

 7): For Installing AutoIT-Click on both AutoIT setup one by one.

 

8): After successful installation – open up AutoIT Editor.

 

8

 

Go to ‘C: \Program Files

 

And click on ‘SciTE.exe’ file, the AutoIT editor opens as shown in below screen.

 

9

 

 9): Now opens element Identifier.

 

Go to ‘C: \Program Files (x86)\AutoIt3’

 

10

 

Selenium Coaching in Kukatpally

 

And click on ‘Au3Info.exe’ file, the element identifier opens as shown in below screen.

 

11

Creating Keyword & Frameworks with Selenium | Selenium testing KPHB

Selenium testing KPHB

Creating Keyword & Hybrid Frameworks

Frameworks assist to structure our code and maintenance easy. Without frameworks we could place total our code. Which is neither reusable nor readable and data in same place. To produce beneficial outcomes for using of frameworks. Like increase code reusage, higher portability, reduced script maintenance cost etc

There are three types of frameworks created by Selenium WebDriver to automate manual testcases

Data Driven Test Framework

Keyword Driven Test Framework

Hybrid Test Framework

 

Data Driven Test Framework

 

Test data is produce from some external files. Like excel, csv, XML or some database table in data driven framework.

 

Keyword Driven Test Framework

 

All the operations and instructions are register in some external file. Like excel worksheet in keyword driven test framework. Here is how the fulfilled framework looks like

 

2

 

If you can see it’s 5 steps of framework. Let’s refer it step wise in depth 

Selenium testing KPHB

Step 1) the driver script Execute.java can call ReadKosmikExcelFile.java

 

ReadKosmikExcelFile.java has t0 read data from an excel for POI script 

 

Step 2) ReadKosmikExcelFile.java should read data from TestCase.xlsx

 

Here how the sheet focus like:

 

3

 

Observe to the keywords written in excel file, the framework can perform the operation on UI.

 

For example, we want to click a button ‘Login’. State, our excel should have a keyword ‘Click’. Now the AUT will have hundreds of button on a page. To know a Login button, in excel input Object Name as login Button & object type as name. The Object Type will be xpath, name css or any other value

 

Step 3) ReadKosmikExcelFile.java can form this data to the driver script Execute.java

 

Step 4) for all our UI web elements we want to create an object repository.  Where should we place their element locator (like xpath, name, css path, class name etc.)

 

4

 

Execute.java could read the entire Object Repository and store in a variable

 

To read this object repository we want a Read Object class. Which has a getObjectRepository method to read it.

 

5

 

Step 5) the driver will pass the data from Excel & Object Repository to UIOperation class

 

UIOperation class has functions to perform actions. State to keywords like CLICK, SETTEXT etc mentioned in the excel

 

UIOperation class is a java class which has to implementation of the code. To perform operations on web elements

 

6

 

The complete project should focus like:

 

7

 

Installation of Selenium IDE | Selenium Coaching Institute in KPHB

 

Selenium Coaching Institute in KPHB

Step 1 – Install Java on your computer

 

First we have to Download and install the Java Software Development Kit (JDK) 

1

2

This JDK version comes bundled with Java Runtime Environment. So you do not need to download and install the JRE separate.

 

Step 2 – Install Eclipse IDE

 

Download “Eclipse IDE for Java Developers“. Be sure to choose correct between Windows 32 Bit and 64 Bit versions.

3

You should able to download ZIP file named “eclipse-java-juno-SR1-win32-x86_64”

4

Inside ZIP file, there is an “eclipse” folder which contains all the application files. You can extract the “eclipse” folder anywhere you want in your PC. But for this tutorial, extract it to your C drive.

5

Unlike other popular software, no installation is must to use eclipse.

 

Step 3 – Download the Selenium Java Client Driver

 

You can download the Java Client Driver. You could find client drivers for other languages there, but only choose the one for Java.

6

This download comes as a ZIP file named “selenium-2.25.0.zip”. For simplicity, extract the contents of this ZIP file on your C drive. So that you would have the directory “C:\selenium-2.25.0\”. This directory includes all the JAR files that we would later import on Eclipse.

 

Step 4 – Configure Eclipse IDE with WebDriver

 

  1. Launch the “eclipse.exe” file inside the “eclipse” folder that we extracted in step 2. If you followed step 2 correct, the executable should be locate on C:\eclipse\eclipse.exe.
  2. When asked to select for a workspace, just accept the default location.

7

             3.Create a new project through File > New > Java Project. Name the project as “newproject”.

8

A new pop-up window will open enter details as follow

  1. Project Name
  2. Location to save project
  3. Select an execution JRE
  4. Select layout project option
  5. Click on finish button

9

4.in this step,

  1. Right-click on the new created project and
  2. Select New > Package, and name that package as “newpackage”.

10

A pop-up window will open to name the package,

  1. Enter the name of the package
  2. Click on finish button
  3. Create a new Java class under newpackage by right-clicking on it. And then selecting- New > Class, and then name it as “MyClass”. Your Eclipse IDE should look like the image below.

When you click on Class, a pop-up window will open, enter details as

  1. Name of the class
  2. Click on Finish button

 

11

 

  1. Create a new Java class under newpackage by right-clicking on it. And then selecting- New > Class, and then name it as “MyClass”. Your Eclipse IDE should look like the image below.

12

When you click on Class, a pop-up window will open, enter details as

  1. Name of the class
  2. Click on Finish button

13

 

This is how it looks like after creating class.

14

Now selenium WebDriver’s into Java Build Path

In this step,

  1. Right-click on “newproject” and select Properties.
  2. On the Properties dialog, click on “Java Build Path”.
  3. Click on the Librariestab, and then
  4. Click on “Add External JARs..”

15

When you click on “Add External JARs…” It will open a pop-up window. Select the JAR files you want to add.

16

After selecting jar files, click on OK button.

17

  1. Add all the JAR files inside and outside the “libs” folder. Your Properties dialog should now look like to the image below.

18

Selenium Coaching Institute in KPHB

 

7.Finally, click OK and we are complete importing Selenium libraries into our project.

Selenium TestNg with Framework | Selenium Training in KPHB

Selenium Training in KPHB

 

Selenium TestNg with Framework

 

TestNG is a testing framework inspired from JUnit and NUnit. But introduce some new functionality that makes it more powerful and easier to use. It is an open source test framework where NG of TestNG means Next Generation. TestNG is like JUnit but it is much more powerful than JUnit but still it’s inspired by JUnit. It is design to better than JUnit, especially when test integrated classes. Pay special thanks to Cedric Beust who is the author of TestNG.

TestNG eliminates most of the limitations of the older framework. Gives the developer the ability to write more flexible and powerful tests. With help of easy annotations, group, sequence & parametrize.

 

Advantages of TestNG

 

There are number of benefits but from Selenium perspective, great advantages of TestNG:

It gives the capacity to provide HTML Reports of execution

Annotations made testers life easy

Test cases can Group & Prioritized easier

Parallel testing is possible

Generates Logs

Data Parameterization is possible

 

Test Case Writing

 

Write a test in TestNG is quite simple and involves below steps:

Step 1 – Write the business logic of the test

Step 2 – Insert TestNG annotations in the code

Step 3 – Add the information Example the class names, methods names, group names etc in a testng.xml file

Step 4 – Run TestNG

 

Annotations in TestNG

 

Before Suite: The annotated method will run before all tests in this suite have run.

After Suite: The annotated method will  run after all tests in this suite have run.

Before Test: The annotated method should run before any test method. Belongs to the classes inside the tag will run.

After Test: The annotated method should run after all the test method. Belongs to the classes inside the tag have run.

Before Groups: The list of groups that this configuration method will run before. This method is guarantee to run shortly before the first test method. Belongs to any of these groups is invoke.

After Groups: The list of groups that this configuration method will run after. This method is guarantee to run shortly after the last test method. Belongs to any of these groups is invoke.

Before Class: The annotated method will run. Before the first test method in the current class is invoke.

After Class: The annotated method will run. After all the test methods in the current class have run.

Before Method: The annotated method will run before each test method.

After Method: The annotated method will run after each test method.

Test: The annotated method is a segment of a test case.

 

Benefits of using Annotations

It identifies the methods it is interest in by look up annotations. Hence method names are not restricted to any pattern or format.

We can pass extra parameters to annotations.

 

Selenium Training in KPHB

Annotations are strong typed, so the compiler will flag any mistakes right away.

Test classes no longer need to extend anything (such as Test Case, for JUnit 3).

 

Selenium IDE Commands List

Selenium IDE Commands List-Hyderabad

The over all IDE script creation process classified into Three Steps.

1: Recording

2: Playing back

3: Saving

Step1: Recording

Selenium IDE supports to record user interactions with the browser. Thus the over all recorded actions are termed as Selenium IDE script.

Step2: Playing back

In this step, first we have to verify track stability and success rate. Then we can execute the recorded script in IDE.

Step2: Saving

Once we have recorded a stable script, we may want to save it for future runs and regressions.

Using Common features of Selenium IDE

Setting Execution speed

While testing web applications, we get across several scenarios where an action performed. Thus we must be having knowledge is enough while dealing such scenarios. So avoid failures while playing back these types of test scenarios.

Using Execute this command option

IDE let have executing a single test step within the entire test script. “Execute this command” option can be use at times when we want to debug of a particular test step.

Using Start point

To specify a start point within a test script to allows in IDE. The start point points to the test step from where we wish to start the test script execution. We customize the script to execute from a certain step.

Using Break point

User to specify break points within a test script to allow in IDE. The break points state Selenium IDE where to pause the test script. It can be use when we want to break the execution in small logical steps to execution trends.

Using Find Button

One of the most crucial features of IDE test scripts is to find and locate web elements within a web page. Web elements which have certain respect of thing associated with them. User can for challenging for making to identify a particular web element different. Selenium IDE provides Find button for the address of this issue.

Selenium IDE Commands

Types of Selenium IDE commands

Here three types of Selenium IDE commands. Each of the test steps in Selenium IDE falls extending any of the following categories.

  1. Actions
  2. Accessors
  3. Assertions

Actions

Actions commands are which interact with direct application either altering. Its state or by pouring some test data.

Accessors

Accessor’s commands are which allows user to store certain values to user defined variable. These keep values can be later on used to create assertions and verifications.

Assertion

Assertions are like to Accessors as they can’t interact with the application. Assertions are use to verify the present state of the application with a regard state.

Forms of Assertions:

  1. Assert:This command makes sure that the test executionis end in case of failure.
  2. Verify: This command lets the IDEto supporton with the test script execution even if the verification is fails.
  3. Wait For:This command waits for an exact condition to arrangebefore executing the next test step.

These conditions are like page to be load, element to be present extending

Online Selenium Training in Hyderabad

Online Selenium Training in Hyderabad

Course name:  Selenium

Faculty: Highly qualified and experience

About Online Selenium Training in Hyderabad

Kosmik is a Best Institute for Online Selenium Training in Hyderabad. we proud to say kosmik is one of the Best Online Selenium Training Institute in Hyderabad. we are providing Online Selenium Training in Hyderabad with Live projects. Selenium Training in Hyderabad faculty is Highly qualified and experienced. kosmik Designed Online Selenium training course in Hyderabad as per the Latest trend. kosmik provides 24*7 days Online support for the students. Our faculty is going to cover all concepts in-depth online selenium training in Hyderabad. kosmik is the right choice for Online Selenium Training in Hyderabad, India.

Highlights of the Selenium Training :

we provide course material with real-time scenarios.
we are providing classes with real time experienced faculty.
we will conduct demo sessions for students with flexible timings.
we will give 365 days technical support.
Every concept will be covered with a real-time solution.
we are also having weekend and fast track batches.
we are providing job oriented training.
we are giving placement support for the students.

Online Selenium Training in Hyderabad Course Content :

Introduction and Overview to Selenium Training

Introduction to Automation testing
Why and When it comes into the picture
supporting browsers and platforms of selenium
Basic concepts of Java
Uses of Automation Testing
Environment needs for selenium
Difference between selenium and QTP
Features of Selenium

Web Driver

web driver for selenium
web driver v/s RC
Accessing multiple browsers using web driver
Internet Explorer
Mozilla Firefox
Google Chrome
Installation and Configuring Eclipse for web driver
Constructing X path for web element using Firebug-Fire Path methods.
starts with
Parent
Ancestor
Following and preceding sibling
Normalize space
substring
Handling web elements using web driver
Handling Attributes of developer tools of Internet Explorer

Form Controls

Accessing Input box
Accessing combo Boxes using select and List
Accessing Check Box
Accessing Links

Parameterization

Accessing rows and columns of Excel sheet
Parameterization of test data using MS Excel sheet

Selenium Training in Hyderabad, Classroom & Online Training

About Selenium Training in Hyderabad

Kosmik Technologies providing best Selenium Training in Hyderabad, we are offering Classroom and Online Selenium training by real time experienced faculty. Our faculty is Certified, dedicated and Highly Qualified. Kosmik Technologies provide 24/7 days online support for the students. Our selenium Training course content designed as per the latest trend. We are offering job oriented selenium Training. We are covering each & every topic in detail and real time projects. Kosmik Technologies is the best institute for Selenium Training in Hyderabad.

Course Highlights

selenium testing tool introduction
selenium components and architecture
selenium vs other automation tools
selenium features advantages
Testing framework in selenium
eclipse framework

Selenium Architecture:

selenium RC and webdriver architecture
webdriver vs selenium RC
advantages of webdriver for selenium ide

Locator techniques in selenium:

Introduction Locator concept
About different locator techniques
selenium XPath locator contains text

Selenium IDE:

Download & Installation
record and playback in selenium
how to modify script using IDE
convert selenium ide to selenium RC
validate the locator using IDE

Selenium Setup:

step by step Explanation for setup
integration of selenium with eclipse

Selenium RC:

selenium server start
test annotation in selenium
basic selenium script

Webdriver in Selenium:

selenium webdriver setup
webdriver commands with examples
event handling in different browsers
webdriver methods in selenium
selenium webdriver programming
RC commands from webdriver
migrating selenium rc to webdriver
project structure organization

Testing Framework in Selenium:

selenium test framework design
testing annotations in selenium
testing configuration
suite execution from command prompt
testing suite parallel execution
report generation in selenium webdriver
assertion selenium
selenium verification errors
listeners concept in selenium
Preparing customized report using selenium & Java

Auto IT in selenium:

Autoit tool in selenium webdriver
create AutoIt script
au3 to Exe converter
Autoit script in selenium webdriver

Selenium Grid:

Introduction
selenium grid setup
selenium grid parallel execution
simple script execute commands