Friday, November 30, 2012

Selenium General FAQS - I

1) What is Selenium? 
A. Selenium is an API which integrates with Editors like Eclipse, MS Visual Studio etc…, to automate browser based applications. The Integration of selenium Jars and Editor like Eclipse becomes a tool, where people are calling selenium tool for browser base applications. Selenium automation tool which lets you automated operations like – type, click, verify, validate and select a web page. The drawback of selenium is it performs only web based operations.

2) How is Selenium different from commercial browser automation tools?
A. Selenium is a library which is available in a range of languages i.e. java, C#, python, ruby, PHP etc while most commercial tools are limited in their capabilities of being able to use just one language. More over many of those tools have their own proprietary language which is of little use outside the domain of those tools. Most commercial tools focus on record and replay while Selenium emphasis on using Selenium IDE (Selenium record and replay) tool only to get acquainted with Selenium working and then move on to more mature Selenium libraries like Remote control (Selenium 1.0) and Web Driver (Selenium 2.0). Though most commercial tools have built in capabilities of test reporting, error recovery mechanisms and Selenium does not provide any such features by default but given the rich set of languages available with Selenium it very easy to emulate such features.

3) What are the set of tools available with Selenium? 
A. Selenium has four set of tools – Selenium IDE, Selenium 1.0 (Selenium RC), Selenium 2.0 (WebDriver) and Selenium Grid. Selenium Core is another tool but since it is available as part of Selenium IDE as well as Selenium 1.0, it is not used in isolation.

4) Which Selenium Tool should I use? 
A. It entirely boils down to where you stand today in terms of using Selenium. If you are entirely new to Selenium then you should begin with Selenium IDE to learn Selenium location strategies and then move to Selenium 2 as it is the most stable Selenium library and future of Selenium. Use Selenium Grid when you want to distribute your test across multiple devices. If you are already using Selenium 1.0 than you should begin to migrate your test scripts to Selenium 2.0

5) What is Selenium IDE? 
A. Selenium IDE is a Firefox plug-in which is (by and large) used to record and replay test is Firefox browser. Selenium IDE can be used only with Firefox browser.

6) Which language is used in Selenium IDE? 
A. Selenium IDE uses html sort of language called SELENESE. Though other languages (java, c#, PHP etc) cannot be used with Selenium IDE, Selenium IDE lets you convert test in these languages so that they could be used with Selenium 1.0 or Selenium 2.0

7) What is Selenium 1.0?
A. Selenium 1.0 or Selenium Remote Control (popularly known as Selenium RC) is library available in wide variety of languages. The primary reason of advent of Selenium RC was incapability of Selenium IDE to execute tests in browser other than Selenium IDE and the programmatical limitations of language Selenese used in Selenium IDE.

8) What is Selenium 2.0? 
A. Selenium 2.0 also known as WebDriver is the latest offering of Selenium.
It provides
              • better API than Selenium 1.0
              • does not suffer from java script security restriction which Selenium 1.0
              • does supports more UI complicated UI operations like drag and drop

 9) What are the element locators available with Selenium which could be used to locate elements on web page? 
A. There are mainly 4 locators used with Selenium –
         • Html id
         • Html name
         • XPath locator and
         • Css locators
         • Class Name

 10) What is Selenium Grid? 
A. Selenium grid lets you distribute your tests on multiple machines and all of them at the same time. Hence you can execute test on IE on Windows and Safari on Mac machine using the same test script (well, almost always). This greatly helps in reducing the time of test execution and provides quick feedback to stack holders.