www.edureka.co/testing-with-selenium-webdriver FIRST SLIDE
www.edureka.co/testing-with-selenium-webdriver
www.edureka.co/testing-with-selenium-webdriver Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 1 What is Selenium? Selenium Interview Questions Selenium ✓ Automation testing suite ✓ Helps in automating web applications ✓ Open-source ✓ It is a package of several testing tools
www.edureka.co/testing-with-selenium-webdriver Question 2 What are its different components? Selenium Interview Questions Selenium Selenium IDE Selenium RC Selenium WebDriver Selenium Grid • Record and Playback tool • Distributed as Firefox plugin
www.edureka.co/testing-with-selenium-webdriver Question 2 What is Selenium? What are its different components? Selenium Interview Questions Selenium Selenium IDE Selenium RC Selenium WebDriver Selenium Grid • Server used in execution • RC is deprecated
www.edureka.co/testing-with-selenium-webdriver Question 2 What is Selenium? What are its different components? Selenium Interview Questions Selenium Selenium IDE Selenium RC Selenium WebDriver Selenium Grid • Directly communicates with browser • Has more advantages over RC
www.edureka.co/testing-with-selenium-webdriver Question 2 What is Selenium? What are its different components? Selenium Interview Questions Selenium Selenium IDE Selenium RC Selenium WebDriver Selenium Grid • Used to distribute test execution • Supports cross-browsing
www.edureka.co/testing-with-selenium-webdriver What is a Selenium framework? Question 3 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 3 What is a Selenium framework? Selenium Interview Questions It is a code structure for making code maintenance simpler, and code readability better. This framework involves breaking the entire code into smaller pieces of code, which test a particular functionality. It can also be structured in a way wherein, the test cases which need to be executed are called (invoked) from an external application
www.edureka.co/testing-with-selenium-webdriver Selenium Interview Questions What are the different types of frameworks in Selenium? Question 4
www.edureka.co/testing-with-selenium-webdriver Question 4 What are the different types of frameworks in Selenium? Selenium Interview Questions The technique of separating the “data set” from the actual “test case” (code). Data Driven The technique wherein we can make the best use of both Data Driven & Keyword Driven framework Hybrid The technique in which all the operations to be performed are written separately from the actual test case Keyword driver
www.edureka.co/testing-with-selenium-webdriver Selenium Interview Questions What are the challenges and limitations of Selenium WebDriver? Question 5
www.edureka.co/testing-with-selenium-webdriver Question 5 What are the challenges and limitations of Selenium WebDriver? Selenium Interview Questions Limitations ✓ Cannot test mobile applications ✓ Handling the pop-ups ✓ Dynamic content ✓ Limited reporting Challenges ✓ Cannot perform tests on web services like SOAP or REST using Selenium. ✓ It is difficult to test Image based application. ✓ Selenium need outside support for report generation activity like dependence on TestNG or Jenkins.
www.edureka.co/testing-with-selenium-webdriver What are the drawbacks of Selenium RC? Question 6 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver What are the drawbacks of Selenium RC? Question 6 Selenium Interview Questions APIs are the less object oriented Server connection is required before executing the test script. Selenium RC's architecture is more complicated Selenium RC is slower since it uses a JavaScript program
www.edureka.co/testing-with-selenium-webdriver Explain how Selenium Grid works? Question 7 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 7 Explain how Selenium Grid works? Selenium Interview Questions Grid is capable of coordinating WebDriver tests/ RC tests which can run simultaneously on multiple web browsers
www.edureka.co/testing-with-selenium-webdriver Mention the capabilities of Selenium WebDriver Question 8 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 8 Mention the capabilities of Selenium WebDriver Selenium Interview Questions • Alerts • Handling multiple frames • Handling pop-ups • Handling browser windows • Helps in Page navigation • Drag and drop • Supports Ajax based applications
www.edureka.co/testing-with-selenium-webdriver List out the different test types that are supported by Selenium Question 9 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 9 List out the different test types that are supported by Selenium Selenium Interview Questions For web-based application testing, Selenium can be used Functional Testing Regression Testing Selenium could be used with Jenkins ,Hudson, QuickBuild
www.edureka.co/testing-with-selenium-webdriver Mention why to choose Python over Java Question 10 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 10 Mention why to choose Python over Java Selenium Interview Questions Python over Java Java tends to slow down Java uses traditional braces Java is statically typed
www.edureka.co/testing-with-selenium-webdriver What is Selenese? Different types of Selenese commands used Question 11 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 11 What is Selenese? Different types of Selenese commands used Selenium Interview Questions Selenese is the set of selenium commands which are used to test your web application 01 02 03 Actions Used for performing operations Assertions Used as checkpoints Accessors Used for storing a value in a particular variable
www.edureka.co/testing-with-selenium-webdriver How to build the object repository? Question 12 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 12 How to build the object repository? Selenium Interview Questions An object repository is a common storage location for all objects. In Selenium WebDriver context, objects would typically be the locators used to uniquely identify web elements.
www.edureka.co/testing-with-selenium-webdriver Explain about the WAIT statements Question 13 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 13 Explain about the WAIT statements Selenium Interview Questions Exception appears when there is a delay in loading time of the elements which we are interacting. To overcome this issue we need to use Wait Commands. IMPLICIT WAIT 01 EXPLICIT WAIT 02
www.edureka.co/testing-with-selenium-webdriver Question 13 Explain about the WAIT statements Selenium Interview Questions The implicit wait tells to the WebDriver to wait for certain amount of time before it throws an exception Implicit Wait Explicit waits are confined to a particular web element. Explicit Wait is code you define to wait for a certain condition to occur before proceeding further in the code. Explicit Wait driver.manage().timeouts().implicitlyWait(TimeOut,TimeUnit.SECONDS); WebDriverWait wait = newWebDriverWait(WebDriverRefrence,TimeOut); ➢ WebDriver Wait ➢ Fluent Wait
www.edureka.co/testing-with-selenium-webdriver What is the use of Selenium IDE? Question 14 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 14 What is the use of Selenium IDE? Selenium Interview Questions It is one of the simplest frameworks in the Selenium Suite. It allows you to record and playback the scripts record and playback
www.edureka.co/testing-with-selenium-webdriver What are Locators in Selenium? Question 15 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 15 What are Locators in Selenium? Selenium Interview Questions Locators are defined as an address that identifies a web element uniquely within the webpage
www.edureka.co/testing-with-selenium-webdriver What are different types of Locators Selenium? Question 16 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver 01Question 16 What are different types of Locators Selenium? Selenium Interview Questions ID 02 03 04 05 06 Name LinkText Partial LinkText CSS Selector XPath
www.edureka.co/testing-with-selenium-webdriver How to use FindElement and FindElements in Selenium? Question 17 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 17 How to use FindElement and FindElements in Selenium? Selenium Interview Questions FindElement command is used to uniquely identify a (one) web element within the web page Find Elements command is used to uniquely identify the list of web elements within the web page driver.findElement(By.id("pt1:_UIShome::icon")); WebDriver <List>= driver.findElements(By.id(“ID"));
www.edureka.co/testing-with-selenium-webdriver Question 18 How to select the size the browser window? Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 18 How to select the size the browser window? Selenium Interview Questions Maximize, get the actual size, resize the window Maximize() Driver.manage().window.maximize() Window.getSize(); Driver.manage.window.setSize(d); Resize the current window Set particular size (JavaScriptExecutor)driver.executeScript (“window.resizeTo(x,y)”);
www.edureka.co/testing-with-selenium-webdriver Question 19 How to work with Excel files in Selenium? Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 19 How to work with Excel files in Selenium? Selenium Interview Questions JXL Apache POI
www.edureka.co/testing-with-selenium-webdriver What is a JavaScriptExecutor? OR How to scroll using Selenium? Question 20 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 20 What is a JavaScriptExecutor? OR How to scroll using Selenium? Selenium Interview Questions 01 JavaScriptExecutor is an Interface that helps to execute JavaScript through Selenium WebDriver. 02 It provides two methods "executescript" & "executeAsyncScript 03 It is used when Selenium WebDriver fails to click on any element.
www.edureka.co/testing-with-selenium-webdriver What is POM? What are its advantages? Question 21 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 21 What is POM? What are its advantages? Selenium Interview Questions Page Object Model is a design pattern in test automation to create an Object Repository for web UI elements. Page Object Model
www.edureka.co/testing-with-selenium-webdriver Question 21 What is POM? What are its advantages? Selenium Interview Questions Advantages keeps the tests and element locators separately Makes automation framework friendly, more durable and comprehensive. Repository is Independent of Automation Tests. Able to reuse page object methods POM is best applicable for the applications which contain multiple pages Easier to write because it uses the business domain language.
www.edureka.co/testing-with-selenium-webdriver What is Page Factory? Question 22 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 22 What is Page Factory? Selenium Interview Questions Page Factory is an in-built page object model pattern used to initialize web elements which are defined in Page Objects
www.edureka.co/testing-with-selenium-webdriver What is the difference between Page Object Model (POM) and Page Factory? Question 23 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 23 What is the difference between Page Object Model (POM) and Page Factory? Selenium Interview Questions PAGE OBJECT MODEL PAGE FACTORY It is a class which represents the web page and holds the functionalities It is a way to initialize the web elements within the page object when the instance is created
www.edureka.co/testing-with-selenium-webdriver How to handle mouse and keyboard and mouse actions? Question 24 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 24 How to handle mouse and keyboard and mouse actions? Selenium Interview Questions Actions class This includes actions such as drag and drop, clicking multiple elements. perform() method is used here to execute the action. Actions class is a built-in ability to handle various types of keyboard and mouse events. It mainly contains Actions and Action classes
www.edureka.co/testing-with-selenium-webdriver What is an Actions Class? Question 25 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 25 What is an Actions Class? Selenium Interview Questions Actions class It handles special keyboard and mouse events using the Advanced User Interactions API.
www.edureka.co/testing-with-selenium-webdriver Can Selenium handle window pop- ups? Question 26 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 26 Can Selenium handle window pop- ups? Selenium Interview Questions Selenium does not support handling pop-ups Alert is used to display a warning message. It is a pop-up window that comes up on the screen
www.edureka.co/testing-with-selenium-webdriver Question 26 Can Selenium handle window pop- ups? Selenium Interview Questions This method is called when you click on the ‘OK’ button of the alert. This method is called when the ‘Cancel’ button is clicked in the alert box. Void dismiss() Void accept() String getText() This method is called to capture the alert message. Void sendKeys(String stringToSend) This is called when you want to send some data to alert box.
www.edureka.co/testing-with-selenium-webdriver What is a Robot class? Question 27 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 27 What is a Robot class? Selenium Interview Questions This Robot class provides control over the mouse and keyboard devices.
www.edureka.co/testing-with-selenium-webdriver Question 27 What is a Robot class? Selenium Interview Questions This Robot class provides control over the mouse and keyboard devices. 04 03 02 01 MousePress() This is used to press the left button of the mouse KeyRelease() This method is used to release the pressed key on the keyboardMouseMove() This method is called when you want to move the mouse pointer in the X and Y co-ordinates KeyPress() This method is called when you want to press any key 05 MouseMove() This method helps in releasing the pressed button of the mouse
www.edureka.co/testing-with-selenium-webdriver How do you achieve synchronization in WebDriver? Question 28 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 28 How do you achieve synchronization in WebDriver? Selenium Interview Questions It is a mechanism which involves more than one components to work parallel with each other. Synchronization can be classified into two categories: 01 02 In this we just specify timeout value only.We will make the tool to wait until certain amount of time and then proceed further. It specifies a condition along with timeout value, so that tool waits to check for the condition and then come out if nothing happens. Unconditional Conditional
www.edureka.co/testing-with-selenium-webdriver How to take a screenshot in Selenium? Question 29 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 29 How to take a screenshot in Selenium? Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 29 How to take a screenshot in Selenium? Selenium Interview Questions Selenium has provided TakesScreenShot interface by which we can use getScreenshotAs method which will help in capturing the entire screenshot in form of file then using FileUtils we can copy screenshots from one location to another location File src= ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); try { // now copy the screenshot to desired location using copyFile //method FileUtils.copyFile(src, new File("C:/selenium/error.png"));
www.edureka.co/testing-with-selenium-webdriver How to handle multiple windows in Selenium? Question 30 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 30 How to handle multiple windows in Selenium? Selenium Interview Questions A window handle is a unique identifier that holds the address of all the windows. This is basically a pointer to a window, which returns the string value • get.windowhandle(): helps in getting the window handle of the current window • get.windowhandles(): helps in getting the handles of all the windows opened • set: helps to set the window handles which is in the form of a string. • switch to: helps in switching between the windows • action: helps to perform certain actions on the windows.
www.edureka.co/testing-with-selenium-webdriver What are Listeners in Selenium? Question 31 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 31 What are Listeners in Selenium? Selenium Interview Questions It is defined as an interface that modifies the behavior of the system. Listeners allow customization of reports and logs.
www.edureka.co/testing-with-selenium-webdriver What are different types of TestNG Listeners in Selenium? Question 32 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 32 What are different types of TestNG Listeners in Selenium? Selenium Interview Questions • IAnnotationTransformer • IAnnotationTransformer2 • IConfigurable • IConfigurationListener • IExecutionListener • IHookable • IInvokedMethodListener • IInvokedMethodListener2 • IMethodInterceptor • IReporter • ISuiteListener • ITestListener
www.edureka.co/testing-with-selenium-webdriver What are the features of TestNG? Question 33 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 33 What are the features of TestNG? Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver What are Assert and Verify commands? Question 34 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 34 What are Assert and Verify commands? Selenium Interview Questions There won’t be any halt in the test execution even though the verify condition is true or false. An assertion is used to compare the actual result of an application with the expected result. Assert Verify
www.edureka.co/testing-with-selenium-webdriver How can you redirect browsing from browser through PROXY Question 35 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 35 How can you redirect browsing from browser through PROXY Selenium Interview Questions String PROXY = “199.201.125.147.80000” Cap.setCapability(CapabilityType.PROXY,proxy); Selenium provides PROXY class to redirect from a proxy
www.edureka.co/testing-with-selenium-webdriver How can you debug the tests in Selenium IDE? Question 36 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 36 How can you debug the tests in Selenium IDE? Selenium Interview Questions Insert a break point from the location where you want to execute Run
www.edureka.co/testing-with-selenium-webdriver How can you handle network latency in Selenium? Question 37 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 37 How can you handle network latency in Selenium? Selenium Interview Questions driver.manage.pageLoadingTime() Network Latency
www.edureka.co/testing-with-selenium-webdriver How can you capture server-side log in Selenium? Question 38 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 38 How can you capture server-side log in Selenium? Selenium Interview Questions Java-jar.jar-log selenium.log In order to get the server-side log, Open the command prompt and type the following command
www.edureka.co/testing-with-selenium-webdriver What are Regular Expressions? Question 39 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 39 What are Regular Expressions? Selenium Interview Questions Regular expressions are a very useful technique for improving Selenium WebDriver tests. Regular expression patterns in Selenese need to be prefixed with either regexp or regexpi. The former is case-sensitive; the latter is case- insensitive
www.edureka.co/testing-with-selenium-webdriver How can you achieve Database Testing using Selenium? Question 40 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 40 How can you achieve Database Testing using Selenium? Selenium Interview Questions Selenium does not support Database Testing, still, it can be partially done using JDBC and ODBC
www.edureka.co/testing-with-selenium-webdriver Why do you need Session Handling? Question 41 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 41 Why do you need Session Handling? Selenium Interview Questions Selenium must interact with the browser for proper execution
www.edureka.co/testing-with-selenium-webdriver What are Exceptions in Selenium? Question 42 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 42 What are Exceptions in Selenium? Selenium Interview Questions An exception is an event or a problem that arises during the execution of a program •WebDriverException •NoSuchWindowException •NoAlertPresentException •NoSuchFrameException •NoSuchElementException
www.edureka.co/testing-with-selenium-webdriver How can you prepare a customised HTML report in TestNG using Hybrid framework? Question 43 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 43 How can you prepare a customised HTML report in TestNG using Hybrid framework? Selenium Interview Questions 1. Junit with the help of an Ant 2. TestNG using inbuild default file 3. Also use XSL file
www.edureka.co/testing-with-selenium-webdriver How can you switch between the Frames? Question 44 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 44 How can you switch between the Frames? Selenium Interview Questions driver.switchTo.frame 1. Number 2. Name or an ID 3. Location of previous element
www.edureka.co/testing-with-selenium-webdriver Difference between Selenium and QTP Question 45 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Browser compatibility Distribution Application under test Language support Vendor support Repository
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Browser compatibility Cannot be run across different browsers but only windows and it can test web, mobile and desktop applications Run across different browsers and can test only web applications Java
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Distribution Licensed toolOpen source tool
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Application under test Web as well as mobile applicationsOnly web based application
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions In-built object repository No in-built repository but it uses the element by the UI Repository
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Language support Supports only VBScript Supports different languages like Java, Python, C# etc
www.edureka.co/testing-with-selenium-webdriver Question 45 Difference between Selenium and QTP Selenium Interview Questions Vendor support Vendor support is present As it is an open-source tool, no Vendor support to troubleshoot
www.edureka.co/testing-with-selenium-webdriver Difference between SetSpeed and Sleep method Question 46 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 46 Difference between SetSpeed and Sleep method Selenium Interview Questions Thread.sleep() Pauses the execution for a specific period of time Delays the execution for a specific amount of time setSpeed()
www.edureka.co/testing-with-selenium-webdriver How to submit a form in Selenium? Question 47 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 47 How to submit a form in Selenium? Selenium Interview Questions You can use the Submit button You can Click
www.edureka.co/testing-with-selenium-webdriver What are the WebDriver APIs available? Question 48 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 48 What are the WebDriver APIs available? Selenium Interview Questions HTML Unit driver is the fastest HTML Unit driver Firefox driver ChromeDriver OperaDriver SafariDriver
www.edureka.co/testing-with-selenium-webdriver Can I navigate back and forth the webpage in Selenium? Question 49 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 49 Can I navigate back and forth the webpage in Selenium? Selenium Interview Questions Yes. You can navigate in the browser 01 02 03 04 Driver.navigate.forward Driver.navigate.back Driver.navigate.refresh Driver.navigate.to(“url”)
www.edureka.co/testing-with-selenium-webdriver Why do you prefer Selenium? Question 50 Selenium Interview Questions
www.edureka.co/testing-with-selenium-webdriver Question 50 Why do you prefer Selenium? Selenium Interview Questions It has a large user base and helping community Cross-browsing capability Platform compatibility Support for different programming languages Free and Open-source
www.edureka.co/testing-with-selenium-webdriver
Selenium Interview Questions and Answers For Freshers And Experienced | Edureka

Selenium Interview Questions and Answers For Freshers And Experienced | Edureka