Selenium Interview Questions and Answers

Selenium Interview Questions and Answers


Hello and welcome to the Selenium questions and answers video We will see many selenium interview questions with answers. The topics are Selenium IDE, Selenium RC and Selenium WebDriver. Let us get started. What kind of an application is Selenium IDE? it is an add-on in the Mozilla Firefox browser. A Selenium IDE test cases has 3 columns – Command, Target and Value. What data is put in the Target Column? The web element or location where the command will be executed. Which format does the Selenium IDE use to save a test case, by default? As HTML meaning hypertext markup language. What features are available in Selenium IDE to debug an automated test case? Such features include Toggle Breakpoint, Pause/ Resume and Step. What is the Selenium IDE print command? It is the echo command. Selenium IDE commands are in pairs that is a command and the same commands suffixed with AndWait (say click and clickAndWait commands). What is the difference? The first command times out immediately failing the test case but the AndWait command waits for the result up to 30 seconds, which is a default timeout. What is the syntax to get the value of a Selenium IDE variable called customer? ${customer} In Selenium IDE, how do assert and verify commands differ? A failed assert stops the test but a failed verify does not. That is why assert commands are used less than verify commands. Assert is used when it makes no sense to continue the test case. For example, the log in itself has failed In which associative array does Selenium IDE store all of a test case’s variables and their values? In storedVars array Can you create your own Selenium IDE commands? Yes. Such commands can be put in a Javascript file. This file is named user-extensions.js What URLs does the Selenium IDE open command allow? Base URL. URL means uniform resource locator. it is a web address or any URL relative to the base address. or any absolute URL starting with http:// What is the purpose of the Selenium IDE’s Find button? The Find button highlights the web element given in the locator. In Selenium IDE, what is the way to handle asynchronous data retrieval from the server like in Ajax applications? We can use the wait for commands in Selenium IDE. What happens when the web application creates a Javascript alert during test case play in Selenium IDE? If the alert is handled with assertAlert, assertAlertPresent or verifyAlert commands, no alert is displayed and there is no error. However, if there is no command to handle the alert, the test case play is stopped with an error. In Selenium RC, how do you start the browser? With the selenium.Start() command. How do you start Selenium RC server with user extensions? java -jar selenium -server.jar – userExtensions user-extensions.js With Selenium command can run other commands in slow motion in Selenium RC? selenium.setSpeed() command Which Selenium RC command is used to get the alert box? It is a selenium.getAlert() Which Selenium RC command verifies if web element exists or not? selenium.isElementPresent with a string argument as locator Which Selenium RC command is used for typing in a text box? selenium.type with two arguments – the string locator of the text box and the string value to be typed in the text box. In Selenium RC, which command loads the page? selenium.waitForPageToLoad with string timeout in milliseconds. Which add-on is commonly used with Selenium to identify individual elements on a web page? Firebug add-on Why are relative Xpaths preferred to absolute Xpaths as locators of web elements? The reason is that an absolute Xpath fails if any part of it changes even slightly. What is data parameterization? It means the use of variable test data in some file or table instead of using static or same test data every time. Which Selenium WebDriver method is used to open a URL in the browser? There are two methods get() and navigate().to What is the difference between Selenium WebDriver close and quit methods? The close method only closes the main browser window. However the quit method closes all browser windows including any pop-up windows. In Selenium WebDriver, what does the submit method do? The submit method submits the form. The submit method can work on any web element. Which Selenium WebDriver method is used to change focus to another web element an alert or another browser window? The switchTo() method What functionality does Selenium WebDriver support on browser cookies? WebDriver can add an individual cookie, delete an individual cookie or delete all cookies. In Selenium WebDriver, what is the scope of an implicit weight? It is the current webdriver instance. In this video, we saw basic selenium questions. Hope these selenium questions and answers increased your knowledge of selenium tools. Thank you, and see you in my other videos.

4 thoughts on “Selenium Interview Questions and Answers

  • This video seems to be a little out of date. Most people don't use Selenium IDE or Selenium RC. They usually use Selenium WebDriver instead, and so there may be too much time spent discussing the other tools in this video. Also, Firebug isn't really supported anymore in modern versions of Firefox… it's part of the browser's developer tools now. Regardless, I do appreciate this channel and the videos you publish, so do please continue to make and upload them!

  • Hi sir, Your videos are help ful for a beginner. Try to upload the same PDF file or Document for the above session it will be more helpful to study.
    Thanks,

Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *