Xerago – Selenium Interview Questions
Here is the list of Selenium Interview Questions which are recently asked in Xerago company. These questions are included for both Freshers and Experienced professionals. Our Selenium Training has Answered all the below Questions.
1. Explain about SDLC life cycle
SDLC or software life cycle model is a pictorial and diagrammatic representation of the software life cycle.
A steps has been used to represents all the methods required to make a software product transit through its life cycle stages. It also captures the structure in which these methods are to be undertaken.
- Planning and requirement analysis
- Defining Requirements
- Designing the Software
- Developing the project
- Testing
- Deployment
2. There is a Website to be given to you which shows information which is based on the countries you opened. For example in Chennai it shows “welcome to Chennai” and Canada “welcome to Canada” how do you test them all in the same place?
3. Assume that you have different antivirus software and how will u choose which one is the best.
Top 4 criteria that you should use to select the best security product:- All-inclusive protection – Viruses, Worms, Spyware,etc.,
- Reliable protection - up to date protection Automate security scans, etc.,
- Performance impact - impact on your computer's performance, impact on your computer's performance
- Prefer usability – Easy to use, easy to understand, easy to find documentation.
4. If u want to add some additional features to insurance application for the user-friendliness beyond what was the requirements to be given what will u prefer?
5. The resolution “differ” in the bug report what it means?
6. Which is the package which is to be imported while working with WebDriver?
The Supported package are,- Python
- Ruby
- C#
- Java
7. Firefox Driver is class or an interface and from where is it inherited?
Firefox Driver is class. It is inherited from RemoteWebDriver.
8. How do u get the attribute of the web element?
For return the get attribute of the web element we can use getAttribute.
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.concurrent.TimeUnit;
public class GetSrcAttribute{
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver","C:\\Users\\credosystemz\\Desktop\\Java\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
String u = " https://www.credosystemz.com"driver.get(u);
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
// identify element
WebElement t=driver.findElement(By.xpath("//img[@class='tp-logo']"));
// get src attribute with getAttribute()
System.out.println("Src attribute is: " + t.getAttribute("src"));
driver.close();
}
}
9. Can Selenium handle windows based pop up?
Yes, It has handle window based popup. Here getWindowHandles () and getWindowHandle () methods are used for child windows.
10. What are the advantages of selenium WebDriver?
Top 5 advantages of Selenium WebDriver:- Open source and free of cost
- Multilanguage support
- Selenium WebDriver supports multiple OS like Linux, UNIX, Mac as well as Windows.
- Supports multi browsers and multiple frameoworks
- Easy to Implement
Free PDF : Get our updated Selenium Course Content pdf
11. What is regression testing and retesting?
Regression Testing Repeated testing of an already tested program, after modification, to discover any issues introduced or uncovered as a result of the changes in the software being tested . Verification of bugs are not included in the regression testing.
Retesting
The another name of retesting is confirmation testing. Retesting is to ensure that the defects mainly for during the software development life cycle are fixed and work according to the specifications. During this retesting, the failed test cases are re-executed and passed.
12. Why are we writing test cases?
In software testing the test cases writing is the main part, also the purpose of a test case is to ensure if different features within an application are working as expected. It helps tester, validate if the software is free of defects and if it is working as per the expectations of the end user.
13. How does your ticketing system work?
14. Tell me about yourself.
Explain the answer with present, past and future perspective. ou want to sound natural, like a real person that people would like to have in the next cubicle or talk to at the happy hour. Final words with a brief statement explaining why working for this specific company appeals to you.
15. What is Selenium Grid?
Selenium Grid is a distributed test execution environment to speed up the execution of a test pass. It follows a hub-node architecture. A hub is a master part and node is like the servant part. In a particular set up, there can be an only hub and multiple nodes.
WebDriver can replay your recorded tests in almost any browser. It can compatible with different browsers such as Google chrome, Firebox, Opera,etc.,
16. What is the difference between find Element and find Elements?
Find Element | Find Elements |
---|---|
Selenium Find Element command takes in the By object as the parameter. Also, returns an object of type list WebElement in Selenium. | FindElements in Selenium command takes in By object as the parameter and returns a list of web elements |
Syntax is : WebElement loginLink = driver.findElement(By.linkText("Login")); | Syntax is: List |
Find Element throws a NoSuchElementException. | Find Elements doesn’t throw NoSuchElementException. |
17. How do you click on a menu item in a drop down menu?
Web driver provides the 3 steps to select option in menu item with drop down,- selectByIndex
- selectByValue
- selectByVisibleText
18. Give the example for method overload in WebDriver.
Different number of parameters
test( )
}
test(int a)
{
}
test(double d)
{
}
test(int x, int y)
{
}
Differently declared parameters
1. object.test( )
test( ) {
}
2. object.test(5)
test(int a) {
}
3. object.test(5.5)
test(double d) //A method with a single double declared parameter
{
}
4. object.test(5, 6) - This statement will call the below method as it is passing two integer arguments 5 and 6
test(int x, int y) //A method with two integer declared parameters
{
}
19. What are the annotations used in TestNG?
- @Test,
- @BeforeSuite
- @AfterSuite
- @BeforeTest
- @AfterTest
- @BeforeClass
- @AfterClass
- @BeforeMethod
- @AfterMethod
20. What is the difference between Assert and Verify?
Most importantly assert is used to verify the result. If the test case fail then it will stop the execution of the test case there itself and move the control to other test case.
Verify is also used to verify the result of your project. In case any fail in your test case then it will not stop the execution of that test case.
Book a Free Mock Interviews and Test your Selenium skills with our Experts
TOP MNC's SELENIUM INTERVIEW QUESTIONS & ANSWERS
Here we listed all Selenium Interview Questions and Answers which are asked in Top MNCs. Periodically we update this page with recently asked Questions, please do visit our page often and be updated in Selenium.
Related Blogs
To become a Selenium Certified professional and join in your dream company, Enroll now for our Best Selenium Training. We help you to crack any levels of Selenium Interviews and We offering Selenium Training with Placement Assistance.