Top 15 Selenium Interview Questions for Freshers

Home/Interview Questions/Top 15 Selenium Interview Questions for Freshers

Top 15 Selenium Interview Questions for Freshers

1. What is JAVA?

  • Java is a programming language or platform.
  • Java is guaranteed to be Write Once, Run Anywhere.

2. Some Important features of JAVA

  • Object Oriented
  • Platform Independent
  • Simple
  • Secure
  • Architecture-neutral
  • Portable
  • Robust
  • Multithreaded
  • Interpreted
  • High Performance
  • Distributed
  • Dynamic

3. Types of Applications that Run on Java

  • Desktop Graphical User Interface Applications
  • Mobile Applications
  • Embedded Systems
  • Web Applications
  • Web Servers and Application Servers
  • Enterprise Applications
  • Scientific Applications

4. Java Modifiers

There are two categories of modifiers:

  • I. Access Modifiers: default, public , protected, private
  • II. Non-access Modifiers: final, abstract, static, strictfp

5. Different types of Java variables

  • Local Variables
  • Class / Static Variables
  • Instance / Non-static Variables

6. Components of Selenium

  • Selenium Integrated Development Environment (IDE)
  • Selenium Remote Control (RC)
  • Selenium WebDriver
  • Selenium Grid

7. Web Elements

  • Browser
  • Page
  • Edit Box
  • link
  • Button
  • image-simple image, Image Link, Image Button
  • Text Area
  • Check Box
  • Radio Button
  • Drop Down Box
  • List box
  • Combo box
  • Web Table/HTML Table
  • Frame

8. Element Locators

    Selenium supports 8 element locators to recognize elements

  • className
  • cssSelector
  • id
  • linkText
  • name
  • partialLinkText
  • tagName
  • xpath

9. What is Xpath?

  • XPath is defined as XML path.
  • It is a syntax or language for finding any element on the web page using XML path expression.
  • XPath is used to find the location of any element on a webpage using HTML DOM structure.

10. Selenium WebDriver

  • WebDriver is a software tool.
  • Used for testing front end web applications across different browsers.
  • We can use different programming languages.
  • WebDriver directly talks to the browser.
  • Very simple architecture

11. What are the Methods used for Browser handling?

  • get()
  • getTitle()
  • getCurrentUrl()
  • getPageSource()
  • getWindowHandle()
  • close()
  • quit()

12. Browser Navigation Commands

  • navigate().to()
  • navigate().forward()
  • navigate().back()
  • navigate().refresh()

13. What is TestNG?

  • TestNG is a powerful testing framework.
  • TesNG is an open source framework.
  • TestNG stands for Test Next Generation.
  • We can generate test reports.

14. Features of TestNG Framework

  • Test configuration flexible.
  • Supports powerful execution model.
  • Support for parameters.
  • Supports dependent methods testing.
  • TestNG supports Data driven testing using DataProviders.
  • For the same test class TestNG support for multiple instances.
  • Extendibility of using different Tools and plug-ins like Eclipse, Maven, IDEA etc.
  • Default JDK functions for runtime and logging (no dependencies).
  • Supported different Annotations like
    • @BeforeSuite,
    • @AfterSuite,
    • @BeforeClass,
    • @AfterClass,
    • @BeforeTest,
    • @AfterTest,
    • @BeforeGroups,
    • @AfterGroups,
    • @BeforeMethod,
    • @AfterMethod,
    • @DataProvider,
    • @Factory,
    • @Listeners,
    • @Parameters,
    • @Test.

15. Mouse Hover action in Selenium Webdriver

WebElement element = driver.findElement(By.linkText(“About Us”));

Actions action = new Actions (driver);

action.moveToElement (element).build ().perform ();

16. How do you install selenium RC?

Steps to install Selenium RC in Eclipse:

  • Step 1: Install Java on your computer. Download and install the Java Software Development Kit (JDK).
  • Step 2: Install Eclipses IDE.
  • Step 3: Download the Selenium Java Client Driver.
  • Step 4: Download the Selenium server standalone Driver
  • Step 5: Create a RCSERVER in notepad Save as in RCSERVER.bat
  • Step 6: Create a New project in Eclipse.
  • Step 7: Create a New Package
  • Step 7: Create a New Java Class File

17. What is Selenium Grid?

  • It is a part of selenium suite.
  • We can run multiple tests across different browser & operating systems.
  • It is supports distributed environment execution.

About the Author:

Leave A Comment