This tutorial includes the top 50 most frequently asked Selenium interview questions, covering Selenium IDE, Selenium RC, Selenium Grid, and Selenium WebDriver.
A quick note about this Selenium article series before we move to this tutorial:
This is the last tutorial in our Selenium online training series of 30+ comprehensive tutorials. I hope you all enjoyed these tutorials and started learning from them. If you are new here, please head over to this very first tutorial in this training series.

Also, check out this “The Best Online Selenium Training Course” to learn the Selenium automation tool from an expert having 10+ years of Selenium automation experience.
Quick Quiz on Selenium Interview Questions with Final Result
Before checking out the entire list of Selenium Interview Questions, want to take this quick test to know where you are?
Top 50 Selenium Interview Questions and Answers
Here we go.
Q #1) What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves the use of a separate testing tool that lets you create test scripts that can be executed repeatedly and don’t require any manual intervention.
Q #2) What are the benefits of Automation Testing?
The benefits of automation testing are:
- Supports execution of repeated test cases
- Aids in testing a large test matrix
- Enables parallel execution
- Encourages unattended execution
- Improves accuracy, reducing human-generated errors
- Saves time and money
Q #3) Why should Selenium be selected as a test tool?
Selenium
- Is a free and open-source
- Have a large user base and help communities
- Have cross-browser compatibility (Firefox, Chrome, Internet Explorer, Safari, etc.)
- Have great platform compatibility (Windows, Mac OS, Linux, etc.)
- Supports multiple programming languages (Java, C#, Ruby, Python, Pearl, etc.)
- Has fresh and regular repository developments
- Supports distributed testing
Q #4) What is Selenium? What are the different Selenium components?
Selenium is one of the most popular automated testing suites. Selenium is designed in a way to support and encourage automation testing of functional aspects of web-based applications and a wide range of browsers and platforms. Being present in the open-source community, it has become widely embraced by testing professionals.
Selenium is not just a single tool or a utility, but a package of several testing tools, and for the same reason, it is referred to as a suite. Each of these tools caters to different testing and test environment requirements.
The suite package constitutes the following sets of tools:
- Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and playback tool. It is distributed as a Firefox Plugin.
- Selenium Remote Control (RC) – Selenium RC is a server that allows a user to create test scripts in the desired programming language. It enables the execution of test scripts across a wide range of browsers.
- Selenium WebDriver – WebDriver is a different tool altogether that has various advantages over Selenium RC. WebDriver directly communicates with the web browser and uses its native compatibility to automate.
- Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms and environments concurrently.
Q #5) What are the testing types that can be supported by Selenium?
Selenium supports the following types of testing:
- Functional Testing
- Regression Testing
Q #6) What are the limitations of Selenium?
The following are the limitations of Selenium:
- Selenium supports testing of only web-based applications.
- Selenium is not suitable for testing mobile applications.
- 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 which the user can find numerous helping communities.
- The user is expected to possess prior programming language knowledge.
Q #7) What is the difference between Selenium IDE, Selenium RC, and WebDriver?
| Feature | Selenium IDE | Selenium RC | WebDriver |
|---|---|---|---|
| Browser Compatibility | Selenium IDE comes as a Firefox plugin, thus it supports only Firefox | Selenium RC supports a varied range of versions of Mozilla Firefox, Google Chrome, Internet Explorer and Opera. | WebDriver supports a varied range of versions of Mozilla Firefox, Google Chrome, Internet Explorer and Opera. Also supports HtmlUnitDriver which is a GUI less or headless browser. |
| Record and Playback | Selenium IDE supports record and playback feature | Selenium RC doesn’t supports record and playback feature. | WebDriver doesn’t support record and playback feature |
| Server Requirement | Selenium IDE doesn’t require any server to be started before executing the test scripts | Selenium RC requires server to be started before executing the test scripts. | WebDriver doesn’t require any server to be started before executing the test scripts |
| Architecture | Selenium IDE is a Javascript based framework | Selenium RC is a JavaScript based Framework. | WebDriver uses the browser’s native compatibility to automation |
| Object Oriented | Selenium IDE is not an object oriented tool | Selenium RC is semi object oriented tool. | WebDriver is a purely object oriented tool |
| Dynamic Finders (for locating web elements on a webpage) | Selenium IDE doesn’t support dynamic finders | Selenium RC doesn’t support dynamic finders. | WebDriver supports dynamic finders |
| Handling Alerts, Navigations, Dropdowns | Selenium IDE doesn’t explicitly provides aids to handle alerts, navigations, dropdowns | Selenium RC doesn’t explicitly provides aids to handle alerts, navigations, dropdowns. | WebDriver offers a wide range of utilities and classes that helps in handling alerts, navigations, and dropdowns efficiently and effectively. |
| WAP(iPhone/Android)Testing | Selenium IDE doesn’t support testing of iPhone/Andriod applications | Selenium RC doesn’t support testing of iPhone/Android applications. | WebDriver is designed in a way to efficiently support testing of iPhone/Android applications. The tool comes with a large range of drivers for WAP based testing. For example, AndroidDriver, iPhoneDriver |
| Listener Support | Selenium IDE doesn’t support listeners | Selenium RC doesn’t support listeners. | WebDriver supports the implementation of Listeners |
| Speed | Selenium IDE is fast as it is plugged in with the web-browser that launches the test. Thus, the IDE and browser communicates directly | Selenium RC is slower than WebDriver as it doesn’t communicates directly with the browser; rather it sends selenese commands over to Selenium Core which in turn communicates with the browser. | WebDriver communicates directly with the web browsers. Thus making it much faster. |
Q #8) When should I use Selenium IDE?
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 acquaintance with any programming language. Selenium IDE is an ideal tool for a naïve user.
Q #9) What is Selenese?
Selenese is the language that is used to write test scripts in Selenium IDE.
Q #10) What are the different types of locators in Selenium?
The locator serves as an address that uniquely identifies a web element within the webpage. Thus, to identify web elements accurately and precisely, we have different types of locators in Selenium:
- ID
- ClassName
- Name
- TagName
- LinkText
- PartialLinkText
- Xpath
- CSS Selector
- DOM
Q #11) What is the difference between assert and verify commands?
Assert: Assert command checks whether the condition is true or false. Let’s say we assert whether the element is present on the web page or not. If the condition is true, then the program control will execute the next test step, but if the condition is false, the execution will stop and no further test will be executed.
Verify: Verify command also checks whether the condition is true or false. Irrespective of the condition being true or false, the program execution doesn’t halt, i.e. any failure during verification would not stop the execution and all the test steps would be executed.
Q #12) What is an XPath?
XPath is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and stores, organizes, and transports arbitrary data. It stores data in a key-value pair, which is very similar to HTML tags. Both are markup languages and since they fall under the same umbrella, XPath can locate HTML elements.
The fundamental behind locating elements using XPath is the traversing between various elements across the entire page, thus enabling a user to find an element with the reference of another element.
Q #13) What is the difference between “/” and “//” in Xpath?
Single Slash “/” – Single slash is used to create the Xpath with absolute path, i.e. the Xpath would be made to start selection from the document node/start node.
Double Slash “//” – Double slash is used to create an Xpath with a relative path, i.e. the Xpath would be made to start selection from anywhere within the document.
Q #14) What is the same origin policy and how it can be handled?
The problem posed by the same origin policy prohibits the retrieval of the DOM of a document from an origin that differs from the origin we are trying to access.
Origin sequentially combines the scheme, host, and port of the URL. For example, for a URL https://www.softwaretestinghelp.com/resources/, the origin is a combination of http, softwaretestinghelp.com, 80 correspondingly.
Thus, the Selenium Core (JavaScript Program) cannot access the elements from an origin that differs from where it was launched.
For Example, if I have launched the JavaScript Program from “https://www.softwaretestinghelp.com”, then I can access the pages within the same domain such as “https://www.softwaretestinghelp.com/resources” or “https://www.softwaretestinghelp.com/istqb-free-updates/”. The other domains like google.com and seleniumhq.org would no more be accessible.
So, to handle the same origin policy, Selenium Remote Control was introduced.
Q #15) When should I use Selenium Grid?
Selenium Grid can execute the same or different test scripts on multiple platforms and browsers concurrently to achieve distributed test execution, testing under different environments and saving execution time remarkably.
Q #16) What do we mean by Selenium 1 and Selenium 2?
Selenium RC and WebDriver, in combination, are popularly known as Selenium 2. Selenium RC alone is also referred to as Selenium 1.
Q #17) Which is the latest Selenium tool?
WebDriver
Q #18) How do I launch the browser using WebDriver?
The following syntax can launch the Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();
Q #19) What are the different types of Drivers available in WebDriver?
The different drivers available in WebDriver are:
- FirefoxDriver
- InternetExplorerDriver
- ChromeDriver
- SafariDriver
- OperaDriver
- AndroidDriver
- IPhoneDriver
- HtmlUnitDriver
Q #20) What are the different types of waits available in WebDriver?
There are two types of waits available in WebDriver:
- Implicit Wait
- Explicit Wait
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, the 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 until a particular condition is met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a particular instance only.
Q #21) How to type in a textbox using Selenium?
The user can use sendKeys(“String to be entered”) to enter the string in the textbox.
Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);
Q #22) How can you find if an element is displayed on the screen?
WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels, etc.
- isDisplayed()
- isSelected()
- isEnabled()
Syntax:
isDisplayed():
boolean buttonPresence = driver.findElement(By.id("gbqfba")).isDisplayed();
isSelected():
boolean buttonSelected = driver.findElement(By.id("gbqfba")).isSelected();
isEnabled():
boolean searchIconEnabled = driver.findElement(By.id("gbqfb")).isEnabled();
Q #23) How can we get the text of a web element?
Get command is used to retrieve the inner text of the specified web element. The command doesn’t require any parameter but returns a string value. It is also one of the extensively used commands for verification of messages, labels, errors, etc displayed on the web pages.
Syntax:
String Text = driver.findElement(By.id("Text")).getText();
Q #24) How to select the value in a dropdown?
The value in the dropdown can be selected using WebDriver’s Select class.
Syntax:
selectByValue:
Select selectByValue = new Select(driver.findElement(By.id("SelectID_One")));
selectByValue.selectByValue("greenvalue");
selectByVisibleText:
Select selectByVisibleText = new Select (driver.findElement(By.id("SelectID_Two")));
selectByVisibleText.selectByVisibleText("Lime");
selectByIndex:
Select selectByIndex = new Select(driver.findElement(By.id("SelectID_Three")));
selectByIndex.selectByIndex(2);
Q #25) What are the different types of navigation commands?
Following are the navigation commands:
navigate().back() – The above command requires no parameters and takes back the user to the previous webpage in the web browser’s history.
Sample code:
driver.navigate().back();
navigate().forward() – This command lets the user navigate to the next web page concerning the browser’s history.
Sample code:
driver.navigate().forward();
navigate().refresh() – This command lets the user refresh the current web page there by reloading all the web elements.
Sample code:
driver.navigate().refresh();
navigate().to() – This command lets the user launch a new web browser window and navigate to the specified URL.
Sample code:
driver.navigate().to(“https://google.com”);
Q #26) How to click on a hyperlink using linkText?
driver.findElement(By.linkText("Google")).click();
The command finds the element using link text and then clicks on that element and thus the user will be re-directed to the corresponding page.
The above-mentioned link can also be accessed by using the following command.
driver.findElement(By.partialLinkText("Goo")).click();
The above command finds the element based on the substring of the link provided in the parenthesis and thus partialLinkText() finds the web element with the specified substring and then clicks on it.
Q #27) How to handle frame in WebDriver?
An inline frame acronym iframe is used to insert another document within the current HTML document or simply a web page into a web page by enabling nesting.
Select iframe by id
driver.switchTo().frame("ID of the frame");
Locating iframe using tagName
driver.switchTo().frame(driver.findElements(By.tagName("iframe").get(0));
Locating iframe using index
frame(index)
driver.switchTo().frame(0);
frame(Name of Frame)
driver.switchTo().frame(“name of the frame”);
frame(WebElement element)
Select Parent Window
driver.switchTo().defaultContent();
Q #28) When do we use findElement() and findElements()?
findElement(): findElement() is used to find the first element in the current web page matching the specified locator value. Take note that only the first matching element will be fetched.
Syntax:
WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
findElements(): findElements() is used to find all the elements in the current web page matching the specified locator value. Take note that all the matching elements would be fetched and stored in the list of WebElements.
Syntax:
List <WebElement> elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
Q #29) How to find more than one web element in the list?
We may come across elements of the same type, like multiple hyperlinks, images, etc arranged in an ordered or unordered list. Thus, it makes absolute sense to deal with such elements by a single piece of code and this can be done using WebElement List.
Sample Code
// Storing the list
List <WebElement> elementList = driver.findElements(By.xpath("//div[@id='example']//ul//li"));
// Fetching the size of the list
int listSize = elementList.size();
for (int i=0; i<listSize; i++)
{
// Clicking on each service provider link
serviceProviderLinks.get(i).click();
// Navigating back to the previous page that stores link to service providers
driver.navigate().back();
}
Q #30) What is the difference between driver.close() and driver.quit command?
close(): WebDriver’s close() method closes the web browser window that the user is currently working on or we can also say the window that is being currently accessed by the WebDriver. The command neither requires any parameter nor does it return any value.
quit(): Unlike close() method, quit() method closes down all the windows that the program has opened. Same as close() method, the command neither requires any parameter nor does it return any value.
Q #31) Can Selenium handle Windows-based pop up?
Selenium is an automation testing tool that supports only web application testing. Therefore, windows pop-ups cannot be handled using Selenium.
Suggested Reading => Java Architect Interview Questions
Q #32) How can we handle web-based pop-ups?
WebDriver offers users a very efficient way to handle these pop-ups using Alert interface. There are four methods that we will use along with the Alert interface.
- void dismiss() – The dismiss() method clicks on the “Cancel” button as soon as the pop-up window appears.
- void accept() – The accept() method clicks on the “OK” button as soon as the pop-up window appears.
- String getText() – The getText() method returns the text displayed on the alert box.
- void sendKeys(String stringToSend) – The sendKeys() method enters the specified string pattern into the alert box.
Syntax:
// accepting javascript alert
Alert alert = driver.switchTo().alert();
alert.accept();
Q #33) How can we handle Windows-based pop-ups?
Selenium is an automation testing tool that supports only web application testing, which means it doesn’t support testing of Windows-based applications.
However, Selenium alone cannot help the situation, but combining it with some third-party intervention can overcome this problem. There are several third-party tools available for handling Windows-based pop-ups along with the selenium like AutoIT, Robot class, etc.
Q #34) How to assert the title of the web page?
//verify the title of the web page
assertTrue(“The title of the window is incorrect.”,driver.getTitle().equals(“Title of the page”));
Q #35) How to mouse hover on a web element using WebDriver?
WebDriver offers a wide range of interaction utilities that the user can exploit to automate mouse and keyboard events. Action Interface is one such utility that simulates a single-user interaction.
Thus, in the following scenario, we have used Action Interface to mouse hover on a drop down, which then opens a list of options.
Sample Code:
// Instantiating Action Interface
Actions actions=new Actions(driver);
// howering on the dropdown
actions.moveToElement(driver.findElement(By.id("id of the dropdown"))).perform();
// Clicking on one of the items in the list options
WebElement subLinkOption=driver.findElement(By.id("id of the sub link"));
subLinkOption.click();
Q #36) How to retrieve CSS properties of an element?
The values of the CSS properties can be retrieved using a get() method:
Syntax:
driver.findElement(By.id(“id”)).getCssValue(“name of css attribute”);
driver.findElement(By.id(“id”)).getCssValue(“font-size”);
Q #37) How to capture screenshots in WebDriver?
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class CaptureScreenshot {
WebDriver driver;
@Before
public void setUp() throws Exception {
driver = new FirefoxDriver();
driver.get("https://google.com");
}
@After
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void test() throws IOException {
// Code to capture the screenshot
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
// Code to copy the screenshot in the desired location
FileUtils.copyFile(scrFile, new File("C:\\CaptureScreenshot\\google.jpg"));
}
}
Q #38) What is JUnit?
JUnit is a unit testing framework introduced by Apache. Junit is based on Java.
Q #39) What are Junit annotations?
Following are the JUnit Annotations:
- @Test: Annotation lets the system know that the method annotated as @Test is a test method. There can be multiple test methods in a single test script.
- @Before: Method annotated as @Before lets the system know that this method shall be executed every time before each of the test methods.
- @After: Method annotated as @After lets the system know that this method shall be executed every time after each of the test method.
- @BeforeClass: Method annotated as @BeforeClass lets the system know that this method shall be executed once before any of the test methods.
- @AfterClass: Method annotated as @AfterClass lets the system know that this method shall be executed once after any of the test methods.
- @Ignore: Method annotated as @Ignore lets the system know that this method shall not be executed.
Q #40) What is TestNG and how is it better than JUnit?
TestNG is an advanced framework designed in a way to leverage the benefits of both the developers and testers. With the commencement of the frameworks, JUnit gained enormous popularity across Java applications, Java developers, and Java testers with remarkably increasing code quality.
Despite being easy to use and straightforward, JUnit has its limitations, which give rise to the need to bring TestNG into the picture. TestNG is an open-source framework that is distributed under the Apache Software License and is readily available for download.
TestNG with WebDriver provides an efficient and effective test result format that can be shared with the stakeholders to have a glimpse of the product’s/application’s health, thereby eliminating the drawback of WebDriver’s incapability to generate test reports. TestNG has an inbuilt exception-handling mechanism that lets the program run without terminating unexpectedly.
Various advantages make TestNG superior to JUnit. Some of them are:
- Added advance and easy annotations
- Execution patterns can set
- Concurrent execution of test scripts
- Test case dependencies can be set
Q #41) How to set test case priority in TestNG?
Setting Priority in TestNG
Code Snippet
package TestNG;
import org.testng.annotations.*;
public class SettingPriority {
@Test(priority=0)
public void method1() {
}
@Test(priority=1)
public void method2() {
}
@Test(priority=2)
public void method3() {
}
}
Test Execution Sequence:
- Method1
- Method2
- Method3
Q #42) What is a framework?
The framework is a constructive blend of various guidelines, coding standards, concepts, processes, practices, project hierarchies, modularity, reporting mechanisms, test data injections, etc. to pillar automation testing.
Q #43) What are the advantages of the Automation framework?
The advantage of Test Automation framework
- Reusability of code
- Maximum coverage
- Recovery scenario
- Low-cost maintenance
- Minimal manual intervention
- Easy Reporting
Q #44) What are the different types of frameworks?
Below are the different types of frameworks:
- Module Based Testing Framework: The framework divides the entire “Application Under Test” into a number of logical and isolated modules. For each module, we create a separate and independent test script. Thus, when these test scripts are taken together builds a larger test script representing more than one module.
- Library Architecture Testing Framework: The basic fundamental behind the framework is to determine the common steps and group them into functions under a library and call those functions in the test scripts whenever required.
- Data Driven Testing Framework: Data Driven Testing Framework helps the user segregate the test script logic and the test data from each other. It lets the user store the test data into an external database. The data is conventionally stored in “Key-Value” pairs. Thus, the key can access and populate the data within the test scripts.
- Keyword Driven Testing Framework: The Keyword Driven testing framework is an extension of Data-driven Testing Framework in the sense that it not only segregates the test data from the scripts, it also keeps a certain set of code belonging to the test script into an external data file.
- Hybrid Testing Framework: Hybrid Testing Framework is a combination of more than one of the above-mentioned frameworks. The best thing about such a setup is that it leverages the benefits of all kinds of associated frameworks.
- Behavior Driven Development Framework: Behavior Driven Development framework allows automation of functional validations in an easily readable and understandable format to Business Analysts, Developers, Testers, etc.
Q #45) How can I read test data from excels?
Test data can efficiently be read from excel using JXL or POI API. See detailed tutorial here.
Q #46) What is the difference between POI and jxl jar?
| # | JXL jar | POI jar |
|---|---|---|
| 1 | JXL supports “.xls” format i.e. binary based format. JXL doesn’t support Excel 2007 and “.xlsx” format i.e. XML based format | POI jar supports all of these formats |
| 2 | JXL API was last updated in the year 2009 | POI is regularly updated and released |
| 3 | The JXL documentation is not as comprehensive as that of POI | POI has a well prepared and highly comprehensive documentation |
| 4 | JXL API doesn’t support rich text formatting | POI API supports rich text formatting |
| 5 | JXL API is faster than POI API | POI API is slower than JXL API |
Q #47) What is the difference between Selenium and QTP?
| Feature | Selenium | Quick Test Professional (QTP) |
|---|---|---|
| Browser Compatibility | Selenium supports almost all the popular browsers like Firefox, Chrome, Safari, Internet Explorer, Opera etc | QTP supports Internet Explorer, Firefox and Chrome. QTP only supports Windows Operating System |
| Distribution | Selenium is distributed as an open source tool and is freely available | QTP is distributed as a licensed tool and is commercialized |
| Application under Test | Selenium supports testing of only web based applications | QTP supports testing of both the web based application and windows based application |
| Object Repository | Object Repository needs to be created as a separate entity | QTP automatically creates and maintains Object Repository |
| Language Support | Selenium supports multiple programming languages like Java, C#, Ruby, Python, Perl etc | QTP supports only VB Script |
| Vendor Support | As Selenium is a free tool, user would not get the vendor’s support in troubleshooting issues | Users can easily get the vendor’s support in case of any issue |
Q #48) Can WebDriver test Mobile applications?
WebDriver cannot test mobile applications. WebDriver is a web-based testing tool, therefore applications on mobile browsers can be tested.
Q #49) Can a captcha be automated?
No, a captcha and barcode reader cannot be automated.
Q #50) What is an Object Repository? How can we create an Object Repository in Selenium?
Object Repository is a term used to refer to the collection of web elements belonging to the Application Under Test (AUT) along with their locator values. Thus, whenever the element is required within the script, the locator value can be populated from the Object Repository. Object Repository is used to store locators in a centralized location instead of hardcoding them within the scripts.
In Selenium, objects can be stored in an Excel sheet which can be populated inside the script whenever required.
That’s all for now.
Hope in this article you will find answers to the most frequently asked Selenium and WebDriver Interview questions. The answers provided here are also helpful for understanding the Selenium basics and advanced WebDriver topics.
Do you have any Selenium Interview questions that are not answered here? Please let us know in the comments below and we will try to answer all.
=> This finishes not just this article but our complete Selenium training series. Check the list of ALL 30+ tutorials listed on this page. Please let us know your comments and questions.







Write a script to check the username field which should only accept 4 digit or charecter
I have read somewhere that Selenium WebDriver could be used to test Mobile applications as well. Is that true?
Nice and Helpful .
Keep doing such things to help us
Very useful information.
Thanks and much appreciated.
Could you please reply back on below comment #.
#7 Nikesh
Ans to Q#49 is wrong.
Thanks.
@Test @Supriya @Roopesh @Sweta
Thank you for the appreciative words.
Hello team,
You’ve mistakenly mentioned selenium RC is introduced to overcome Same origin policy in question no.14.
But, Same origin policy is the only reason to avoid using Selenium RC and because of that they introduced WebDriver to overcome this problem.
Please update the same, if I am not wrong.
very nice
but add few more questions and answers
Excellent
I like this article, very good
There is away to work with pop up. With SwitchTo().alert()
Along with detailed info, I like the words used which are very common and professional in the Industry.Thank you.
This is very good article for beginners. Thank you so much.
Regards,
Ajay
Very useful post.Thank u so much
Useful article. Got interest in learning selenium on my own after reading this
it is very useful for a fresher student…
u done vary good work
awsome Q&A
Typo error in the Below line
void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop-up window appears.
Thanks. This is fixed!
thanks sir
This is very good article for beginners.
It is very helpful question
Thanks for your article. It helps me a lot.
Please verify the syntax specified in Q 28,
one should be for findElement and another should be findElements :
Find Element:
Actual : WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
Correction : WebElement element = driver.findElement(By.xpath(“//div[@id=’example’]//ul//li”));
Find Elements:
List elementList = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
How to automate/test for the banners (advertisements that keep rolling on the webpage)? Is this possible?
Q:22 isSelected() should be used instead of isDisplayed() in Syntax.
Thanks..very useful..
Please add below question as well:
How to scroll up or down according to web element?
First, If you want to scroll horizontally in the right direction, use the following JavaScript. ((JavascriptExecutor)driver). executeScript(“window. scrollBy(2000,0)”);
Second, ((JavascriptExecutor)driver). executeScript(“window. scrollBy(-2000,0)”);
Jun 21, 2015
Very nice and organised article. Thank you so much.
It’s a very good collection and helpful for all.
very good one more on basics
Very helpful. Thanks a lot.
your Q #48) Can WebDriver test Mobile applications?
answer is wrong…we can use appiup with webdriver to test mobile apps.
Thank you very much for helping US
We hope this year you will have happiness
Thank you So Much!!!
Thank you very much sir
Thank you… It is very easy to understand and face interview confidenlty.
thanks alot,,very useful
Really good article. Keep it up.
Very informative article and really helpful for beginners
THANK YOU
Very helpful series of Selenium. I would request “SoftwareTestingHelp” team to make a mobile app so anytime, anywhere we can use it..
Thank you for making this series available for us.
I wish all the best for future articles.
Hello Sir,
As a fresher these interview questions helps me a lot to know about the subject and also gave me more confident to attend my interview perfectly.
Hi, how do we create batch file(.bat) to execute selenium test suite when we are adding jar/library files using Maven dependencies.
Realy useful and thaks……
Very good information.
I want to know is get() in webdriver is ThreadSafe and Synchronised.
In this tutorial i am getting good knowledge
thanks you for share
Hi, I want to know data driven testing using web driver through excel sheet and CSV file.
Could you please help it out.
Good Info..Thx
Hello,
This is very helpful for us to rush into interview. Thanks for posting such a wonderful notes and making the interviews easy…thanku.
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).*isDisplayed*();
should be
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
Can you draw the common Framework structure in selenium?
thank you very much for writing such a detailed article. It is very helpful:)
nice and helpful and Excellent
hI,
tHIS aRTICLE IS REALLY HELPFUL.
Thank You for sharing such a understandable answers.
Can you please update read value from excel concept as a sample code?
Perfect! thank you
hi manisha, neha , smitha, deepali…
how r u all?
excelent….
i have a question
q- what is constructor. and what will be return the constructor
constuctor is a type of method which gets execueted as soon as object is created
constructor name should be same as class name
and it doesnot have any return type
Hi,
very useful blog, well done,
please provide some information about new version of selenium.
thanks.
good post
Windows pop up can be handle using windows Handler
Katal bai ji katal…..
wah…sirra jma he sirra la ti
.
Excellent post?
Awesome a good collection of frequently asked questions….
Thanks
Implicit and explicit syntax
FOR IMPLICIT WAIT::Webdriver d;
d.manage().timeout().implicitwait(10, TimeUnit.SECONDS);
FOR EXPLICIT WAIT:: WebDriverWait w= new WebDriverWait(d,10);(driver, timeunit in seconds)
For condition:: here condition is that where u want explicit wait to mention, suppose u want to wait for finding a perticular webelement then u can give explicit wait for 1 webelement
w.until(ExpectedConditions.alertspresent());
Thanks for putting together such wonderful post. This is going to help a lot of us.
Just to add some information for
Q48: ” Can WebDriver test Mobile applications?”
a) Mobile applications cannot be automated with WebDriver alone, However with help of third party toold like “appium” mobile application can be automated.
Awesome information about Selenium…It is very useful for Selenium learners…
how to find x-path of a child element if webpage dont have any id,name or any other locator?
Hi,
It’s a very good post. I think adding Q&A about page object could be great. It’s a widely used pattern nowadays.
Excellent, Really awesome article!
I appreciated you
Hi,
This is wonderful post but can you please let me know what all concepts are must for me to crack any interview for Selenium. Thanks in advance for your response.
Good and helpful article.
Thanks..!!
this information is very use full for me
Thank You. Really helped me. Very nice.
Excellent and detailed answers. I will be referring all these tutorials for learning Selenium.
Do now the POM framework….Supriya
Thanks a mil for your time, great tutorial!
really Useful and help to starting ppl………..
Really nice and helping to the new learners as Anbarasu M said above.
I appreciate and request you to post more questions with easy answers.
I hope you will post.
good questions and answers for selenium
selenium 200 plz help me how to use aaa
selenium is a suite of tool or selenium is a suite of APIs
Awesome!!
This is a great post. good for getting a quick revision in detail.
In Selenium IDE I am writting an program to generate the order number. So the next time when I run it throws an error because it has the same Order number. How to handle this
it is very useful for fresher…….Really appreciate!!!!
Mobile apps can be tested as we had done it for Andriod, HTML5, Windows, Blackberry and to some extent iOS too way back in 2011 to 2013.
Really surprising answer.
Very Nice. Basics are validated by these questions.
Very nice QNA
this is very helpful for us..
Thank you. Very informative.
simply awesome
Which installation required for selenium web driver using C# In visual studio, Please give me the detail list of installations step by step.
Your answers for Waits is wrong.
Which test case should not be automated?
Thanks a ton for these questions. They really help.
You could also please include these as well:
51. What is the difference between driver.get() and driver.navigate().to() commands?
52. Can’t we use
FirefoxDriver() driver = new FirefoxDriver(); instead of
WenbDriver driver = new FirefoxDriver();
Good Article. Very informative
Thanks a Lot
yes really its very usefull to all …and also easy to understand ……great work
Very helpful..
This session is very help for all of beginners , thank you editor
Hello There,
Please correct syntax of mentioned question
Q #28) Syntax
WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
It should be
WebElement element = driver.findElement(By.xpath(“//div[@id=’example’]//ul//li”));
Thank you.
Can you please tell me why you have used double forward slashes as “//ul//li”
thats path
Thank you Helpful for all …
Thanks a lot buddy.. Great help for those who just want to quickly look up some questions..
Great collection.
Thank you so much for your course 🙂
Good Tutorial
Thank you. What else can you suggest on our Article?
good questions and answers for selenium
Very informative article , Thanks
Please ignore above comment, even that works!
Wonderful collection with amazing explanation.
Actually my problem is that i have used javascriptexecutor to find the element by id but id of that element has to change everytime so i know in that case dynamic xpath should be used but result is coming with some error so can you help me how to write dynamic xpath in javascriptexecutor.
good collection..Covers all important aspects 🙂
Very Helpful, Thanks for sharing…
I am new to selenium n i have comleted my course please help me in frame work concept with real time code.
Very useful. Thanks a lot
Nice easy to remberred thnq
it really wonder full interview Q/A for fresher
extremely useful post. Thanks
Excellent Q&A for testing.Really its very helpful.
Good
Its very useful. Very good post
as we can work with the parameters instead of writing the script in the tool. So can you please assest me on this issue
Really good and Helpfull… Try to give the basic code for some questions like data reading Excel sheet etc…
Thanks a lot …
Hi,
Thanks a lot. Found the info very useful.
Regards
Narayana
very good….Thanks
Nice tutorial
Ans to Q#49 is wrong.
Its not wrong, if you automate captcha than automation failed. Captcha need human attention so can not be automate.
excellent…it is very helpful…for everyone
Thanks lot
Content is in understandable format.
Thanks for posting
t.ly/Weyh
Yes thanku
Gr8 job….wonderful post….Thanks for sharing knowledge.
Keep posting and updating new questions too
Thank a lot 🙂
Thanks for explaining all questions however i just wanted to ask you about Jenkins if possible for you.
Great article for beginners like me!
Thanks
Thank you somuch..
Awesome q&A
Very useful and more informative.. more helpful for us..
A very descriptive tutorial .That help beginners gain expertise .Thank you!!
Very Good. Almost all basics covered. Thanks!!!
#246.nasarath
1.No such Element Exception
2.Element is Not Clickable
3.Stale Element Exception
Impresionante,
Como podría leer un javascrips incrustado en html
very good post ….
Really…..very needful….
Thank you
Thank you for this article, it was very informative.
Recently i had attended an interview on selenium where they had asked me to write a webdriver program to count the number of hyperlinks in a webpage. It is also most frequent question now a days. so pls add this question to the list it might be useful for someone else.
Too much useful & sharp answers with a valid point !!
Thank You.
Thanks very much!!!
Very Useful and Informative.
This is a great post. good for getting a quick revision.
Covered all the basic level selenium questions asked in interviews. Helps in quick revision. Good Job Team. Keep updating!
please any one explaining frameworks and how to implement framework,jar files and testng files in project
please explaining
thanking you..
Very simple questions..normally the standard of questions in interview is greater t han the one mentioned here
I just have read this article and attending an interview for automation.. Truly wonderful article…
Really very good information, thank you so much.. 🙂
Thank you so much for this post.i found the information very useful.
i love the content and the way u clear everything.
I have a question.
Question.
Suppose you have automated all the 1000 test cases. If client asked to run two test cases suppose those are 576 and 598. Then how will it performed ?
Hi Shruthi, This is really helpful to new learner and they can be easily able to understood about selenium.
Thanks for this post..
Have a great future….
can you push few code snippet for Verify method avaliable as a counter part to Assert……….
very good and helpful
How is a constructor used in Selenium ? Very important please add this.
It is used in Page Object Model. Our BasePage class will have a constructor which takes a WebDriver object to initialize a WebDriverWait object. The constructor will also be responsible to initialize WebElements via PageFactory.
Really excellent.It helped me a lot.
Great! Very useful.
Thank you.
Selenium is the most effective test automation tool for qa due to its wide range of features such as open source, supports many languages, integrates easily with many platforms, has cross browser support and is best suited to test web applications. Hence, businesses need to prefer selenium tool as a promising test automation tool for web applications testing.
HI Team, Can you please check is it really possible to switch to frame using ID in Q27.
Select iframe by id
driver.switchTo().frame(“ID of the frame“);
Good Artical!!!!!!!!!!
This looks good for Selenium beginners…. try to post few complex questions which exp guys will face…..
Eg: how to handle dynamic text boxes ,
dynamic elements handlings,
can we have -ve priority or not ,
How to handle Keyboard using diff class avaliable in selenium…..etc….
Thanks
nice tutorial to quickly refresh the basic concepts
hi ur suggestionis very powerfull i thought selenium is very hard bt ur ans so easy ty so much……..
package one;
import java.util.Iterator;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
public class Wells {
public static void main(String[] args) {
//1 verify credit cards present in Banking if not continue
//locate banking block
System.setProperty(“webdriver.chrome.driver”, “chromedriver.exe”);
WebDriver driver = new ChromeDriver();
driver.get(“https://www.wellsfargo.com/sitemap”);
String searchingText = “Credit Cards”;
boolean flag=false;
WebElement creditCardLink;
// 1. Finding Credit cards in Banking
List banking =driver.findElements(By.xpath(“//*[@id=’contentBody’]/div[1]//a”));
WebElement CreditCardBanking = searchLink(banking,searchingText);
if (CreditCardBanking != null){
System.out.println(“Credit Cards is present “);
}
flag = false;
// 2. Verify Credit card is present in or not in the Loans and Credit
List LoadnandCredit = driver.findElements(By.xpath(“//*[@id=’contentBody’]/div[2]//a”));
WebElement creditCardLoan = searchLink(LoadnandCredit ,searchingText);
Assert.assertNotNull(creditCardLoan);
System.out.println(“tested”);
// 3 click on credit card link in Loans and credit
creditCardLoan.click();
// 4 Get URL of the Browser
System.out.println(driver.getCurrentUrl());
// 5 verify Title of the window is “Credit Cards – Apply for a Credit Card Online – Wells Fargo”
Assert.assertEquals(driver.getTitle(),”Credit Cards – Apply for a Credit Card Online – Wells Fargo”);;
driver.close();
}
public static WebElement searchLink(List locator, String searchingText) {
boolean flag = true;
;
WebElement link,ccLink=null;
String linkText;
Iterator itr = locator.iterator();
while(itr.hasNext()){
link = itr.next();
linkText = link.getText();
if (linkText.equals(searchingText)){
flag = true ;
ccLink = link;
}
}
return ccLink;
}
}
Nice tutorial!
Excellent post. May be you can also porvide some info on how are the DB connectivities made from the tool.
How to test/automate the banners on the webpage?
Very informative specially for those preparing for interviews.
i want to knw how to test multiple tests in multiple browsers at time using grid.do u have any code.pls post in ur website.
Awesome Post Shruti. Thanks for sharing 🙂
Webdriver is used in Appium which we use to test mobile application. Thus Appium = Selenium Webdriver + X
Questionnaire
1. When would you plan/start automation for a project? What would be your pre-requisites?
2. If you have to automate scripts for 2 or more websites that have similar functionality what would your automation approach be?
3. Define your strategy on integration of automation with CI/CD?
4. Create and provide a couple of automation scripts on any ecommerce user flow with the automation tool you are working with.
5. How would you strategize a release in Agile?
6. Use Case: You are working on a time sensitive project and you realize the quality of the code is not satisfactory. How would you handle this situation?
please help me this Questionnaire
Hi,
The tutorial is very clear and understandable. Thank you so much as it is very useful for preparing interviews.
Thank u vignesh@
How to handle versions of tests in Selenium?
You are amazing! But, you need to read the above comments and make necessary changes in the article.
On Q#32,
void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop up window appears.
– In the above sentence, the word “accept()” should be replaced with “dismiss()”.
Interviewer can ask below given question on core java points. Prepare these thing before interview
1. Interface
2. Inheritance
3. String
4. Collection framework
Mobile Testing is possible and can done using sele,,
This article helps me a lot. Thank you
Write a program for Print common characters in given two strings using selenium with java.
actions.moveToElement(driver.findElement(By.id(“id of the dropdown”))).perform();
You forgot to call the build() method before the perform()
Excellent. It is very good for beginners.
Awesome Article, thankyou!
Hi,
Good Explanation and easy to learn. thank uuuuu soo much.
Regards,
kiran
Tutorial is good, it will be better if it includes about POM in it.
PAGE OBJECT MODEL :-
1.create separate object repository to store the object locators
2.for each web page there should be a separate page class
3.the page class will have all object locators and preferably action methods for the corresponding webpage
BENEFITS OF POM:-
1.Test objects and functions are separated for easy maintenance and keeping the code clean
2.objects are kept separated from test scripts and can be used multiple times in multiple scripts
3.every unique object locator is created only once
4.easy maintence and less rework.
Thanks, this will be helpful.
exlent
Q 32) Instead of dismiss in the explanation you’ve written accept() for both accept() as well as dismiss(). Apart from this, the Article is superb.
void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop up window appears.
q-28 When do we use findElement() and findElements()?
you did one mistake in findelement syntx,
driver.findelement.(BY.id(“behbvr”));
PLEASE do change.
Really Good. It helps me a lot
Selenium version and date of release it will help to know about selenium from begning.
hi,
question no. 35
Acton is not interface . it is a class.
Hi,
Action is an interface and Actions is a Class
Actions class is based on builder design pattern which builds a composite actions with the aggregation of Selenium WebDriver, where webdriver is only used to identify the presence of web elements on web application
Action interface is only used to represent the single user interaction i.e to perform the series of action items build by Actions class.
How to explain automation life cycle? and
what is actual automation process (selenium)in practical ?
plz mail me
keep posting such helpful data . Really very good set of questions.
Hi,
There is one correction in below question and answer,
Q #24) How to select value in a dropdown?
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isDisplayed();
Please, fix this answer.
Shyamal
Pass the id value, driver.findElement(By.id(“pass the id value here”)).isDisplayed();
Mobile application CAN be tested with Selenium,
No,using selenium tool we can tested only the web based applications(like html documents )
and window popup’s are not handles y using selenium, using autoIT and robot we can handle it
awesome article
Very precise and accurate. Thankyou for posting it 🙂
Thank you so muchh….It is very helpfull for me..:-)
Q #31) Can Selenium handle windows based pop up?
We can handle the window popup using AUTOIT
Very helpful ….
Thank you …
Thanks a lots , these material have a lot. Easy way to understand. I recall some of the information very quickly
Thanks for sharing your knowledge.
In the types of framework I could not see Page object model which is used extensively across the market, please include materials regarding POM framework.
Using web driver,write a code to scroll down without using action class and scroll up without using action class.
Thanks!
You can add questions regarding locating dynamic elements and most popular design patterns used in automation.
Good Explanation
Your post is mostly useless !
The testng vs junit question does not tell us how the two are different. Instead there are a lot of unrelated points like open source in that answer. Looks like you get paid by the word.
Excellent blog for selenium learners.
hi @shruti….how r u?
Very good compilation! Thanks!
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver(); we cannot launch InternetExplorer and Chrome driver directly usinh instance.we need set systemproperty
Really very much informative…..
good and understandable documents..
Thank you..
Thank you very much for this information. Everything was precise. It was very helpful!
Above questions are very helpful and I think you should add some advanced level questions. I have been asked questions in interview like:
– What are the problems you have faced while scripting in selenium and how did you resolve them.
– What are disadvantage of POM.
– what is desiredCapabilities
– Questions from TestNG.
very help full for fresher candidate.
a very nice artical like it
Thank you
Very helpful.
Every one clearly understand
Thanks for sharing . It was very useful .
All questions with answers are most helpful for iterview..
we need all Frameworks explanation…. thank you
how to automate scroll down using selenium web driver?
Thanks it helps me a lot
Thank you very much…Really very useful 🙂
It is great supported to everyone. Such a great helping to everyone.
Add Pom and TestNG Prioritizing
Correct the answer at #27
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));
should be
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”)).get(0);
what is different in two ..
one ) less on the end.
hi,
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0)); is correct as it closed properly everything including frame too
ur suggestion:> driver.switchTo().frame(driver.findElements(By.tagName(“iframe”)).get(0); is wrong as it doesntt close the frame() method
hi,
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0))); is correct
ignore the above comment
selenium installation is very urgent please
I started learning selenium some 1 months back and believe me whatever you have posted have helped me lot to acquire proficiency in selenium.
I think your post is phenomenal for interview purpose and its also a synopsis of selenium overall.
Keep it up and kudos to you for your efforts.
Cheers Shruti!!!..:)
In question 35 Line of code 2
actions.moveToElement(driver.findElement(By.id(“id of the dropdown”))).perform();
Its should use build().perform() istead of perform()
Please correct it
Very good article.
Please keep sharing Testing knowledge.
Thank u……………
Very useful info.It helped me a lot.
Good and Helpful post
Thanks 🙂
So much helpful 🙂
keep posting..
Thank you, it was neat and clear
Many Answers are wrong…. e.g difference b/w implicit wait and explicit wait
Hi,
The above article is very useful to know the important questions asked in the interviews.But If you can explain more about object repository then it will be a great help.
Thanks,
Savitri
Very nice
given above information is fabulous
Thank you for sharing this information on Selenium Testing
Selenium is an open-source, test automation tool that has become an important automation tool in the software quality assurance world. This selenium testing tool consists of a different set of tools which include Selenium WebDriver, Selenium RC, Selenium IDE, and Selenium Grid, all of which have different features.
At Q #22) How can you find if an element in displayed on the screen?
Is the below method explanation is typo error or what?
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isDisplayed();
I guess it should be :
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
Please correct me if I am wrong.
hi sir
how to handle captcha and barcode please reply sir
very nice and informative article
guys i have a question that i got from interview . The interviewer was asking me
li a
li a
a
a
he gave me Dom Stracture and asked me what is the xpath for value a ?
i was totally confused and i inspected the elements and given value of xpath to a as = //@magicdom#@!/*&/
can any one solve my problem
very helpful and good article..
Thank u so much 🙂
It’s good article
you explained in very easy language..
Excellent Article
Very nice explanation.
Awesome article! Thanks a lot for the share.
I would only request the author to keep it up to date from time to time. Will be really helpful !
FOR IMPLICIT WAIT::Webdriver d;
d.manage().timeout().implicitwait(10, TimeUnit.SECONDS);
FOR EXPLICIT WAIT:: WebDriverWait w= new WebDriverWait(d,10);(driver, timeunit in seconds)
For condition:: here condition is that where u want explicit wait to mention, suppose u want to wait for finding a perticular webelement then u can give explicit wait for 1 webelement
w.until(ExpectedConditions.alertspresent());
I have one problem after lunching web browser ,i am not getting my “URL ” i have written right code only..???
Please check your browser version with respect to the Driver version and then run the program.
very good post….very helpful..keep posting such kind of informative post.
great
Thanks. We need topics about TestNG
Why Selenium providing in-built support for firefox ? Why that support is not there in Selenium 3 ?
Nice and helpful
It is very helpful and good article.. Thank u so much
please can u give me a answar
i was went a interview last 5 days back that time intervier asked
can u tell me any 3 real time exceptions in selenium
All questions with answers are most helpful for interview..
thank u for the information…../..
Hey ,
you guys need a standing ovation for providing awesome stuff for free of cost. Thanks buddies 🙂
Hi,
That was a excellent collection of questions.Great 🙂
Please correct the syntax for question 28.
Instead of findElement it is mentioned as findElements.
Good Article liked it…
Awesome Post!!!
Very good for selenium leaner..
Q
Write your gherkin format and run it to create your Step definition. How do you know your test has passed?
Excellent Artical to gain selenium knowledge. Thank you.
Hi,
This is helpful for selenium students. In Q22 have some wrong statement. please check this as a report.
this isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
Excellent Artical to gain selenium knowledge. Thank you.
It’s a good article but one thing to correct: ‘Actions’ is a class in selenium, not an interface.
Very much helpful. Thanks a lot. 🙂
Awesome Post. Thanks a lot!
Hello Sir,
One clarification testers are required for big companies or small companies?
Any need of testers in a company,if if how for…..what is our preference
Why all are asking experience and offers low salary.
Please give ans.
Thank you
Hi
In Q)22
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isDisplayed();
Typo error.
isSelected(): – by using this statement to make sure that WebElement is ” isSelected ”
for checkboxes like that
Example :- if we write like this
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
sop( buttonSelected );
output :- if element is selected in that webpage then it will return the output
“TRUE”
otherwise “FALSE ”
like wise IsDisplayed and IsEnablead
Awesome knowledge on Selenium, very crisp and point to point.
Awesome post nice.
The contents are very useful and excellent post.
This is really helpful for beginners.Thank you for sharing knowledge.
I am not Clear about FrameWork Question?
Question 29:
I feel like this will generate a StaleElementReferenceException. You have returned to a page and tried to click on an element you retrieved before you left the page. I haven’t verified, but that sounds like a stale element to me.
very good post, this is very useful for us.
Little unclear on 48th answer
superb
WebDriver is a web-based testing tool, therefore applications on the mobile browsers can be tested.
correct this statement it should be therefore applications on the mobile browsrs can not be tested using WebDriver.
you can test mobile app with Selenium +Appium.
The information what is shown is very much useful and intersting . Thankyou for this valuable stuff.
“selenium-server-standalone” jar contains all the library files to run automation scripts then why do we need to use “selenium-java” jars?
Try to add basic code using framework for interview purpose…
How to handle scroll up and scroll down in selenium webdriver?
Plz advice.
good job keep it up
Good One !!
Awesome introduction to basics of selenium, if possible post some more real time challenging interview questions.
Like Comparing the logo on web page, To cross verify the web page opened is correct or not, to check how many advertisement windows opened in 1 web page, counting number of elements present on web page with 1 line of code.
Explanation is super and easy to understand…. tq
Very good questions (with ans). Thank you so much for helping many!!
It’s helpful.
Thanks for putting together such wonderful post. This is going to help a lot of us.
1)How to enter text in textbox without using send keys.
2) How to select a webelement in the calender without using loops.
Both question can be archive by JavaScriptExecutor
Its nice collection
Very Useful. Thanks.
Fantastic. Very useful and we’ll explained. Thank you so much.
Hi I Q -28 ) – findElement() – syntax is incorrect
Mentioned Syntax:
WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
Note : use findelement instead of findelements
Corrected Syntaxt :
WebElement element = driver.findElement(By.xpath(“//div[@id=’example’]//ul//li”));
wonderful articles for an impatient learner
super & Duper..,
Nice revision
Hi,
This Article is Very Helpful for me , Thanks for Posting wonderful article .
1. How to test a form with multiple set of test data for the field validation of the form ?
2. How to decide which framework is require if we are establish a new automation project ?
3. How can we show the reports on the dashboard for grapchical representation?
4. How can we handle the dateselection from calender dynamically, there is a date validation can’t select past date or future date ?
good collection.
I have a question, I am able to input value in a text area using Selenium IDE but not able to input value using webdriver (Java). Is there any solution ? Please help.
Thanks very much!!!
Very Useful and Informative.
Very good article on Automation.thankss!
Concise and to the point, just what I needed to get my mojo to study selenium 🙂
I realy like the post and since I have some basic understanding of selenium. So i was able to link every answer with my understanding.
Look forward for more such articles.
very nice article, i want connect in ur circle so plz send ur linkden id
I am new to selenium n i have comleted my course please help me in frame work concept with real time code.
Thanks It was a very helpful article
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isDisplayed();
isdisplayed?
for example the value is ” gbqfba ” right ! if it is displayed in the webpage we can use the displayed method
same if it is selected .isSelected method
Hi,
Nice post, I would also like to add few interview questions which i have faced in recent times
– Cross browsing
– Connections to Database
– Window Handling’s
– About Framework
– About Cont Integration tool and build tools
– challenges
Thanks! Very Helpful.
Awesome information…Thank u…
Good Post, helpfull
Great collection of questions and answers. Thanks for putting them all together.
Thanks again for your time and hard work.
about popups interview questions
and different frame works where it will be used and type of questions in read excel and write excel questions
Excellent, thank you for the information
Hello,
Very good collection of questions and answers. Really helpful…
Download dependinces in maven and where can be stored in repistory
dependencies are stored in .m2 folder
Good collection.
Good one!!!!!!!
Could you please make a video for how to read the excel file. Also, when you call TestNG a framework than what is the difference between TestNG framework and regular framework.
Could you please give example of implicit and explicit wait.
Thank you
Very Helpful information…thank you
Useful article. Keep going!
please please answer to this question …i need this to night bcoz i hv interview tomorrow..
Qus: how reporting done in automation??
Qus2:what are the build in tools use in automation??
Could you add regarding POM Model , Test ng annotations
good explanation…good job
Awesome post
Hi Team,
Thanks for your efforts.
I had a query which i faced during an interview, he asked me that if a web element is not having any locators or many of web elements are having same attributes. Then how to retrieve the information of a particular element.
excellent and helpful…
Q #3) Why should Selenium be selected as a test tool?
we should also add the customer demand is web based software interface which is also a trend in software industry now days. And selenium supports web based applications.
Using Appium we can automate Mobile applications with Selenium.
Nice post.. can find all important question of Selenium
Nice Tutorial. Its cover basic questions.
very good
Earlier, I was not comfortable giving interviews. I guess most of you must be facing the same problem. However, after reading answers to most popular selenium interview questions, I became more confident and comfortable.
Awesome note.. Super se bhi upar…. 🙂
@Dwarika @Rushsun @Jack
Thank you for the appreciation..
I think Actions is a class and Action is a Interface,you need to look up mistakes in Q35.
Thank you..It is very useful for selenium Learners
Really helpful
There is a conflict in Q48.
it should be as:
“WebDriver cannot test Mobile applications. WebDriver is a web based testing tool, therefore applications on the mobile browsers can not be tested.”
And Nice article
Very useful.Really appreciate
Nice Article for fresher
Good Post
Hi
One correction in Question #34
assertTrue(“The title of the window is incorrect.”,driver.getTitle().equals(“Title of the page”));
this line should use asserEquals(“…
Nice Toipc Found Intresting
Thanks very much!believe me answered all my interview question from this blog as far as selenium concerened!
Keep it up admin!
Very Nice Collection………..
what are the selenium commands
they are four
selenium IDE (integrated development environment )
selenium RC ( remote control )
selenium webdriver ( is the latest version of selenium tool )
selenium grid
what is the major difference in between relative vs absolute xpath..
For example:
……………………….
1st time my xpath is—->.//*[@spellcheck=’false’]
this case it will be shown 2matching nodes..and second time i’m filtering this xpath to—>
.//*[@spellcheck=’false’][@id=’Email’]…this time i have only one matching node so i can say this is absolute…!
Excellent Articles…..
where do we use constructor overloading in selenium
Excellent article
thanks for listing important questions and answers
How to perform exception handling in Selenium
Using Try and Catch Blocks
Great Information..thank you
Nice article add PDF file for download
What a great article it’s!! terrific!!
In Question number 32
• void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop up window appears.
it should be :
void dismiss() – The dismiss() method clicks on the “Cancel” button as soon as the pop up window appears.
how to count no of check boxes are checked or unchecked
How do you handle the Frameworks?.
explain the Hybrid Architecture?
Very Good Artical , Keep Doing this …
Really Good Post Team..! Worth visiting the Page.!
Really good and informative article. Thanks for sharing!!
Very good questions (with ans). Thank you so much for helping many!!
Informative One..
question no 22 is 2nd statement should have isSelected instead of IsDisplayed
Nice article !!
But there is one major part is missing that is data driven testing in detail :
1. Using .csv file
2. Data provider
3. Using excel file
Very helpful and appreciate your work
thank you
Hi,
I want to use WebDriver driver object in two or more class without opening more browser open.Also any body provide the format of TestNG code as per above mention.
::
more class use same driver same browser with testng annotation
Please correct the ans of Q #22) How can you find if an element in displayed on the screen?
isDisplayed()
isSelected()
isEnabled()
Syntax error please use isSelected() in the place of isDisplayed() :
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
Thanks for the info. Very useful.
Wonderful …..collection with amazing explanation. Thank you.
Q49. is right.we can’t automate captcha and barcode Because these are dynamic .Every time it will change.
Thank you
Nice article. I really appreciate with it!
Best ,Well described
Awesome post.. Thank you
Really Great work carried by software testing help team !!!!! keep it up the good work!!!
Articles were really helpful.
Thank you very much 🙂
Nicely articulated in the form of QA.
Best part is Code Snippet with comments, thnx !
V. gud articles.
A lot can be gained from these artices.
Very good and useful information on various concepts.
Please do the corrections as per the suggestions related to question 48 and others (if appropriate). The answer should be “….therefore applications on the mobile browsers cannot be tested.” Thanks.
Very helpful-Thanks!!
Salute!
Thanks a lot 🙂
A very good article/references on selenium.
Thank you:)
Q #1) What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves the use of a separate testing tool which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention.
I have different aspect of looking at above question. Automation Testing is validating the system test scenarios using the automated test scripts. It is not all about automating manual process because what if there is no manual process. It not about what we are doing, its about the definition Automation testing i.e validating the system using automated test scripts.
So in the same way, as we say for manual testing is validating the test scenario manually.
I Agree, Manual Testing is the very basic to even begin the script writing for automation
Excellent article. Thanks a million. Its been very helpful.
There is one correction in a part of Q.No. 25. It says that “navigate().to() – This command lets the user to launch a new web browser window and navigate to the specified URL.”
Correction: navigate().to() doesn’t always open a new window. If browser is already opened, it just navigate to the specified URL in the same open window.
Thank you!
Can you explain Import org.openqa.selenium.Webdriver as Webdriver is Interface and org openqa selenium what are they?
what is cross browser Testing? wright code for that