Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Selenium Interview Questions and Answers

Selenium Interview Questions and Answers

Which of the following language is not supported by Selenium

  1. PHP
  2. C#
  3. ASP
  4. Java

Ans – ASP


Which of the following is false in case of waitFor command?

  1. waitForAlertPresent
  2. waitForTextPresent
  3. waitForFramePresent
  4. waitForPageToLoad

Ans – waitForFramePresent


JXL/POI jar files are required to ________.

  1. Requires to verify conditions
  2. In order to use Microsoft Excel files as data source
  3. In order to data drive our test
  4. All of the above

Ans – In order to use Microsoft Excel files as data source


How to create an instance of WebDriver?

  1. WebDriver driver = FirefoxDriver();
  2. WebDriver = new FirefoxDriver();
  3. WebDriver driver = CreateObject FirefoxDriver();
  4. WebDriver driver = new FirefoxDriver();

Ans – WebDriver driver = new FirefoxDriver();


How to navigate to the livetech home page?

  1. Webdriver.get(“http://livetech.co.in”);
  2. driver.navigate(“http://livetech.co.in”);
  3. driver.get(“http://livetech.co.in”);
  4. None of the above

Ans – driver.get(“http://livetech.co.in”);


How to find an element by Name?

  1. WebElement searchBox = driver.findElement(By.name(“someElement”));
  2. WebElement searchBox = findElement(By.name(“someElement”));
  3. WebElement searchBox = driver.findElement(name(“someElement”));
  4. All of the above

Ans – WebElement searchBox = driver.findElement(By.name(“someElement”));


Attend Free Online Demo of Selenium Online Training


Display the title of the page _________.

  1. System.out.println(“Title: ” + driver.Title());
  2. System.out.println(“Title: ” + driver.getTitle());
  3. System.out.println(“Title: ” + getTitle());
  4. None of the above

Ans – System.out.println(“Title: ” + driver.getTitle());


 _________ statement clicks on the first image that has an id attribute that starts with ‘cat_prod_image’.

  1. selenium.click(“//img[(@id,’cat_prod_image’)]”);
  2. selenium.click(“[starts-with(@id,’cat_prod_image’)]”);
  3. selenium.click(“//img[starts-with(@id,’cat_prod_image’)]”);
  4. None of the above

Ans – selenium.click(“//img[starts-with(@id,’cat_prod_image’)]”);


Which one is not the correct type of locater?

  1. ID
  2. .Name
  3. .DOM
  4. .CSS
  5. .XSD

Ans – .XSD


Which component is not the part of Selenium suite?

  1. SeleniumGrid
  2. Selenium RC
  3. .Selenium IDE
  4. .Selenium Web

Ans – .Selenium Web


Which type of exception is handled during compile time?

  1. Unchecked
  2. Checked
  3. Error
  4. None of the above

Ans – Checked


WebDriver’s Actions commands are

  1. commands that directly interact with page elements
  2. commands that allow you to store values to a variable
  3. commands that verify if a certain condition is met
  4. commands that sends key strokes to browser

Ans – commands that directly interact with page elements



What type of Wait objects keep alive until the WebDriver object dies?

  1. Fluent Wait
  2. Implicit Wait
  3. Explicit Wait
  4. All of the above

Ans – Implicit Wait


Which WebDriver method is used to clear all selected entries?

  1. dselectAll()
  2. deselectAll()
  3. deselect_All()
  4. dselect_All()

Ans – deselectAll()


What is the similarity between WebDriver’s close() and quit() methods?

  1. does not accept arguments.
  2. closes the active web browser window
  3. closes all opened web browser windows
  4. None of the above.

Ans – does not accept arguments.


Which WebDriver method is used to select the option at a given index?

  1. selectIndex()
  2. selectedByIndex()
  3. selectByIndexes()
  4. selectByIndex()

Ans – selectByIndex()


What is TestNG

  1. TestNextGeneration
  2. TestNewGenerlization
  3. TestNewGeneration
  4. TestNextGenerations

Ans – TestNextGeneration


If you wanted to access the element that has the text “This element has an ID that changes every time the page is loaded” in it, then which of the following is used

  1. //div[contains(@id,’time_’)]
  2. //div[contains(@id_time())]
  3. //div[parameter(@id_time())]
  4. //div[parameter(@id,’time_’)]

Ans – //div[contains(@id,’time_’)]


What is the name of the Collection interface used to represent elements in a sequence (in a particular order)

  1. Collection
  2. Set
  3. List
  4. Map

Ans – List


Attend Free Online Demo of Selenium Online Training

The post Selenium Interview Questions and Answers appeared first on Best Online Training Institute - Best Software Training Institute.



This post first appeared on Data Science Life Cycle, please read the originial post: here

Share the post

Selenium Interview Questions and Answers

×

Subscribe to Data Science Life Cycle

Get updates delivered right to your inbox!

Thank you for your subscription

×