Ans: Selenium is one of the most popular automated testing tool used to automate various types of applications. Selenium is a package of several testing tools designed in a way for to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms and for the same reason, it is referred to as a Suite. Due to its existence in the open source community, it has become one of the most accepted tools amongst the testing professionals. It consists of three main parts: Selenium IDE, Selenium RC & Selenium Web Driver. Each of these tools is designed to cater different testing and test environment requirements.
Ans: Selenium is used in Automation Testing. Selenium is highly flexible Tool and is used to allowing more options for locating UI elements and comparing expected test results against actual application behavior and also is used to support for executing one’s tests on multiple browser platforms.
Ans:
Ans: The Selenium tool package components are:
Ans: Selenium IDE (Integrated Development Environment) is a plug-in used to record and replay tests in Firefox browser. Scripts may be automatically recorded and edited manually providing auto-completion support and the ability to move commands around quickly.
Ans: Selenium IDE is the simple and easy tool of all the Selenium Package Tools. It has record and playback feature make it exceptionally easy to learn with minimal acquaintances to any programming language. Selenium IDE is an ideal tool for a naïve user.
Ans: Selenium supports the following types of testing’s:
Ans: Selenium supports testing of only web-based applications
Mobile applications cannot be tested using Selenium
Captcha and Barcode readers cannot be tested using Selenium
Reports can only be generated using third-party tools like TestNG or JUnit.
As Selenium is a free tool, thus there is no ready vendor support through the user can find numerous helping communities?
The user is expected to possess prior programming language knowledge.
Ans: The list of driver classes could be used for the browser automation.
Ans: The locator can be termed as an address that identifies a web element uniquely within the webpage. Thus, to identify web elements accurately and precisely we have different types of locators in Selenium:
Ans: Selenese is the language which is used to write test scripts in Selenium IDE.
Ans:
Ans: X Path is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and is used to store, organize and transport arbitrary data. It stores data in a key-value pair which is very much similar to HTML tags. The fundamental behind locating elements using X Path is the traversing between various elements across the entire page and thus enabling a user to find an element with the reference of another element. Both being markup languages and since they fall under the same umbrella, X Path can be used to locate HTML elements.
Ans: Single Slash “/” – The Single slash is used to create Xpath with absolute path i.e. the xpath would be created to start selection from the document node/start node.
Double Slash “//” – The Double slash is used to create Xpath with relative path i.e. the xpath would be created to start selection from anywhere within the document.
Ans: Selenium Grid can be used to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution, testing under different environments and saving execution time remarkably.
Ans: Selenium RC and Web Driver, in a combination, are popularly known as Selenium 2. Selenium RC alone is also referred as Selenium
Ans: WebDriver
Ans: The following syntax can be used to launch Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
Web Driver driver = new Internet Explorer Driver();
Ans: The different drivers available in WebDriver are:
Ans: There are two types of waits available in Web Driver:
Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds) between each consecutive test step/command across the entire test script. Thus, subsequent test step would only execute when the 30 seconds have elapsed after executing the previous test step/command.
Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a particular instance only.