- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
Selenium Interview Questions & Answers - Learning Mode

Selenium Interview Questions & Answers - Learning Mode

Selenium is a free (open source) automated testing suite for web applications across different browsers and platforms. It is quite similar to HP Quick Test Pro (QTP) only that Selenium focuses on automating web-based applications. Selenium is not just a single tool but a suite of software's, each catering to different testing needs of an organization. It has four components. Selenium Integrated Development Environment (IDE) Selenium Remote Control (RC) WebDriver Selenium Grid.

Try Selenium Interview Questions & Answers - Exam Mode

1 2 3 4 Next

Sort By : Latest First | Oldest First | By Rating

Selenium Interview Questions & Answers - Learning Mode
Try Selenium Interview Questions & Answers - Exam Mode
Question: What is TestNG Soft Assertion in selenium webdriver software testing tool?

Answer: Using TestNG soft assertion, we can continue our test execution even if assertion fails. That means on failure of soft assertion, remaining part of @Test method will be executed and assertion failure will be reported at the end of @Test method. Source:
Question: What is Selenium?

Answer: Selenium is an open source automated testing tool to test web applications released under Apache 2.0 license. Source:
Question: Explain setSize method of selenium webdriver software testing tool?

Answer: setSize method of selenium webdriver software testing tool is used to set the size of browser window. The following command set the size of browser window to 500 x 500.

driver.manage().window().setSize(new Dimenson(500,500)); Source:
Question: What are the disadvantages of xPath locator as compared to cssSelector locator?

Answer: Following is the list of disadvantages of xPath locator as compared to cssSelector locator:

1. xPath is slower than cssSelector locator.

2. Every browser reads xPath in different way. e.g, some browsers lie IE reads only lower-cased tag name and attribute Name. So if used in upper case then it will work in Firefox browser but will not work in IE browser.
So we cannot use XPath locators for cross browser testing using selenium WebDriver software testing tool. Source:
Question: Which one is better xpath or CSS ?

Answer: xpath. Source:
Question: What are benefits of using Selenium as a testing tool?

Answer: Following are list of benefits of using Selenium as a testing tool:

1. It is available free of cost.
2. Works on all the platforms i.e, Windows, LINUX, MAC OS.
3. Works on all the browsers i.e, Firefox, chrome, Internet Explorer, Safari etc.
4. We can write tests in different programming languages like Java, PHP, C#, Perl, Pyton, Ruby and Groovy.
5. Supports distributed testing
Question: What is Selenium IDE?

Answer: Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its record and playback feature makes it exceptionally easy to learn with minimal acquaintances to any programming language. Selenium IDE is an ideal tool for a na? user. Source:
Question: What is echo command in Selenium IDE?

Answer: Echo command is used to print content of Selenium variables. It is used for debugging test case. When "echo" command is executed, it will display current stored value of variable into Log area of selenium IDE software testing tool's window. Source:
Question: What is the difference between setSize() and getSize()method?

Answer: window().setSize() method is used to set the size of window in selenium webdriver software test.e.g:

driver.manage().window().setSize(new Dimension(300,500));

The above syntax is used set window width to 300 and height to 500.

window().getSize() method is used to get size of window. E.g.:
The above syntax will return window height.

The above syntax will return window Source:
Question: What is the difference between setPosition() and getPosition()?

Answer: window().setPosition() to set position of window. E.g: We can set window position to 50 points from left side and 200 points from top side using bellow given syntax.

driver.manage().window().setPosition(new Point(50,200));

window().getPosition() to get position of window
Use window().getPosition().getX() to get window position from left side as bellow.


To get window position from top side of screen, use window() Source:
Question: List the WebDriver Supported Browsers?

Answer: Selenium WebDriver API has different drivers to test your web application in different browsers. Following is the list:
Firefox Driver - For Mozilla Firefox browser
Internet Explorer Driver - For Internet Explorer browser
Chrome Driver - For Google Chrome browser
HtmlUnit Driver - GUI-Less(Headless) browser for Java programs
Opera Driver - For Opera browser
Question: What is the syntax to type value in prompt dialog box's input field using selenium WebDriver?

Answer: Prompt dialog is just like confirmation alert dialog but with option of Input text box. To input value in that text box of prompt dialog, we can use bellow given syntax.

Question: What does a comment look like in Source view?

Answer: <!--This is a comment-->
Question: What methods are used to open URL in web browser in selenium webdriver software testing tool?

Answer: Following methods are used to open URL in web browser in selenium webdriver software testing tool:

1. driver.get()method is used to open URL of software web application. This method will wait till the whole page gets loaded.

2. driver.navigate()is used for navigate to URL of software web application, navigate back, navigate forward, refresh the page. It will just navigate to the page but will not wait till the whole page gets loaded. Source:
Question: What method is used to capture screenshot in Selenium WebDriver software testing tool?

Answer: TakesScreenshot method is used to capture screenshot. Java File class will be used to store screenshot in your system's local drive. Source:
Question: What command simulates selecting the browser's Back button in Selenium IDE?

Answer: goBack command
Question: How to achieve flow control in Selenium IDE?

Answer: Selenese does not support condition statements (if else, if)or iterations(for, while)as it executes the script line by line i.e in the sequence. So when flow control is needed, there are three options:

1. Run the script using Selenium-RC and a client library such as Java or PHP to utilize the programming language?s flow control features.

2. Run a small JavaScript snippet from within the script using the storeEval command.

3. Install the goto_sel_ide.js extension. Source:
Question: Which OpenSource Framework is supported in WebDriver with Java?

Answer: JUnit and TestNG are two OpenSource Framework supported in WebDriver with Java Source:
Question: What Is TestNG? Explain its functionalities that makes it powerful than other framework.

Answer: TestNG ("Testing, the Next Generation") is an open source Java unit testing framework that aims to overcome many limitations of JUnit and NUnit. Some new functionalities that make it more powerful and easier to use, such as:
1. JDK 5 Annotations: Annotations in TestNG are lines of code that can control how the method below them will be executed.

2. Flexible test configuration

3. Support for data-driven testing (with @DataProvider)

4. Support for parameters

5. Al Source:
Question: What is Selenium 2?

Answer: Web testing tools Selenium RC and WebDriver are merged in single tool in Selenium 2.0 Source:

1 2 3 4 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.09375 Seconds