Selenium Tutorials

Working with Frames in Selenium Webdriver

What is iFrame? An iFrame (Inline Frame) is an HTML document embedded inside the current HTML document on a website. iFrame HTML element is used to insert content from another source, such as an advertisement, into a Web page. A Web designer can change an iFrame's content without making them reload the complete website. A website can have multiple frames on a single page. And a frame can also have inner frames (Frame in side a Frame)

Firefox Not Connected Exception in Selenium

Scripts that worked earlier may be till yesterday are NOW not working because of Firefox browser upgraded to new version.

Most of them have faced the similar problem when the browser has updated to version . This is the first issue user notices when there is an update in the firefox browser and may not support selenium with older version of jars.

First we need to check if the selenium has come up with new version. Click here to download the latest version of selenium

CSS selectors for Selenium with example

When we don't have an option to choose Id or Name, we should prefer using CSS locators as the best alternative.
CSS is "Cascading Style Sheets" and it is defined to display HTML in structured and colorful styles are applied to webpage.

Selectors are patterns that match against elements in a tree, and as such form one of several technologies that can be used to select nodes in an XML document. Visit to know more W3.Org Css selectors

XPath tutorial for Selenium

XPath is designed to allow the navigation of XML documents,with the purpose of selecting individual elements, attributes, or some other part of an XML document for specific processing.

What is XML?
The Extensible Markup Language (XML) is the context in which the XML Path Language, XPath, exists.

XML provides a standard syntax for the markup of data and documents.

Synchronization in Selenium Webdriver

It is a mechanism which involves more than one components to work parallel with Each other.

Generally in Test Automation, we have two components
1. Application Under Test
2. Test Automation Tool.

Both these components will have their own speed. We should write our scripts in such a way that both the components should move with same and desired speed, so that we will not encounter "Element Not Found" errors which will consume time again in debugging.

Synchronization can be classified into two categories:

Selenium webdriver using Eclipse

To start selenium scripting with Eclipse, you need to first install Java Development Kit (JDK) Download and Install Java

Installing eclipse is very easy, First download eclipse . The downloaded file should be a .zip file. Place it in a folder and ensure that you have full read and write permissions. Try to create a shortcut of the eclipse executable file.

How to Run Webdriver in chrome browser?

Normally to run webdriver, we just need a browser and a selenium server jar file. Selenium 2 by-default supports Mozilla Firefox browser. Then the next question come to your mind is How to run webdriver in other browsers.

Selenium supports to run webdriver in other browsers by just adding an .exe path of the driver server for the individual browsers.

Locators for Selenium

Selenium webdriver uses 8 locators to find the elements on web page. The following are the list of object identifier or locators supported by selenium.

We have prioritized the list of locators to be used when scripting.

id Select element with the specified @id attribute.

Name Select first element with the specified @name attribute.

Linktext Select link (anchor tag) element which contains text matching the specified link text