1.42k likes | 1.42k Vues
This presentation on Selenium Interview Questions will help you prepare for your upcoming Selenium Interview. We have brought all the important Selenium Interview Questions that might be asked in your interview. The questions are classified into different levels: beginner, intermediate and advanced level. Our video questions are from several topics like Selenium IDE, RC, WebDriver, and Selenium Grid. We also have questions that include locating web elements, different types of waits, same-origin policy, and navigation commands. And, we shall understand all these topics and commands with the help of their respective syntaxes.<br>This video would be meaningful for everyone, whether you are a beginner or an experienced professional. <br>Now, let us get started and have a look at the top 50 Selenium Interview Questions.<br><br>Post Graduate Program in DevOps:<br>This program, designed in collaboration with Caltech CTME, prepares you for a career in DevOps, bridging the gap between software developers and operations teams. Our unique Blended Learning combines live online classes, interactive labs and more, giving you hands-on experience and job-ready skills. This Post Graduate Program in DevOps will help you master the art and science of improving the development and operational activities of your entire team. You will build expertise via hands-on projects in continuous deployment, using configuration management tools such as Puppet, SaltStack, and Ansible.<br><br>u2705 Caltech CTME Post Graduate Certification<br>u2705 Receive 25 CEUs from Caltech CTME upon course completion<br>u2705 Caltech CTME Circle Membership<br>u2705 Online Convocation by Caltech CTME Program Director<br>u2705 Master classes with Caltech CTME instructors<br>u2705 Physical Certificate from Caltech CTME (on request)<br>u2705 250 hours of Applied Learning<br>u2705 Enrollment in Simplilearnu2019s JobAssist<br>u2705 Get noticed by the top hiring companies<br>u2705 20 real-life projects on integrated labs<br>u2705 Capstone project in 3 domains<br><br>Learn more at https://www.simplilearn.com/pgp-devops?utm_campaign=DevOps<br>
E N D
1 What is the main purpose of Selenium? • Selenium is one of the most widely used open source tools used for test automation
1 What is the main purpose of Selenium? • Selenium is one of the most widely used open source tools used for test automation • Selenium is a portable and open-source framework for testing web applications
1 What is the main purpose of Selenium? • Selenium is one of the most widely used open source tools used for test automation • Selenium is a portable and open-source framework for testing web applications • It is a cloud-based testing platform that allows testers to record their actions and export them
1 What is the main purpose of Selenium? • Selenium enables parallel test execution, which increases the efficiency of tests
1 What is the main purpose of Selenium? • Selenium enables parallel test execution, which increases the efficiency of tests • Selenium can be integrated with testing frameworks like TestNG
1 What is the main purpose of Selenium? • Selenium enables parallel test execution, which increases the efficiency of tests • Selenium can be integrated with testing frameworks like TestNG • Selenium is a suite of tools, each tool serves different testing needs
2 What do you understand by Automation Testing? • Automation testing is the testing that uses automation tools to write and execute test cases
2 What do you understand by Automation Testing? • Automation testing is the testing that uses automation tools to write and execute test cases • The tools not only access the data and control the code execution, but also compare the actual results with the expected results
3 What are the advantages of Automation Testing? Some advantages of Automation testing are:
3 What are the advantages of Automation Testing? • Some advantages of Automation testing are: • It supports both performance and functional testing
3 What are the advantages of Automation Testing? • Some advantages of Automation testing are: • It supports both performance and functional testing • Supports execution of parallel test cases
3 What are the advantages of Automation Testing? • Some advantages of Automation testing are: • It supports both performance and functional testing • Supports execution of parallel test cases • Reduces the chances of human errors
3 What are the advantages of Automation Testing? • Some advantages of Automation testing are: • It supports both performance and functional testing • Supports execution of parallel test cases • Reduces the chances of human errors • Enables execution of repeated test cases
3 What are the advantages of Automation Testing? • Some advantages of Automation testing are: • It supports both performance and functional testing • Supports execution of parallel test cases • Reduces the chances of human errors • Enables execution of repeated test cases • Saves times and money
4 What is the difference between Selenium 2.0 and Selenium 3.0? • Selenium 2.0 refers to the integration of Selenium WebDriver with the Selenium RC (Selenium 1) • It is a tool that helps in the development of automated tests for web applications • Selenium 3.0 can be referred as the extended version of Selenium 2.0 solving bugs and increasing stability • The big change in the Selenium 3.0 is the core being replaced by a back-end WebDriver
5 What are the testing types supported by Selenium? • The test types supported by Selenium are: • Functional Testing • Regression Testing • Retesting • Acceptance Testing • End-to-End Testing • Smoke Testing
6 What are the different Selenium suite components? Selenium Remote Control Selenium Grid Selenium IDE Selenium WebDriver
7 What are the different programming languages, browsers and operating systems supported by Selenium? • Programming languages supported by Selenium are: • Java • PHP • Python • C# • Ruby • Perl
7 What are the different programming languages, browsers and operating systems supported by Selenium? • Browsers supported by Selenium are: • Google Chrome • Mozilla Firefox • Internet Explorer • Opera • Safari • Edge
7 What are the different programming languages, browsers and operating systems supported by Selenium? • Operating Systems supported by Selenium are: • Android • iOS • Windows • Linux • Mac • Solaris
8 What are the advantages of WebDriver over Selenium RC? • Selenium WebDriver has simpler architecture in comparison to Selenium RC which makes it faster
9 What are the advantages of WebDriver over Selenium RC? • Selenium WebDriver has simpler architecture in comparison to Selenium RC which makes it faster • The WebDriver can directly interact with the browser unlike Selenium RC
9 What are the advantages of WebDriver over Selenium RC? • Selenium WebDriver has simpler architecture in comparison to Selenium RC which makes it faster • The WebDriver can directly interact with the browser unlike Selenium RC • HtmlUnit is supported by the WebDriver and not the Selenium RC
9 Why testers choose Selenium over QTP • Selenium is an open source tool and is specifically designed to test web based applications
9 Why testers choose Selenium over QTP • Selenium is an open source tool and is specifically designed to test web based applications • There are several browsers supported by Selenium, while QTP just supports Internet Explorers on Windows
9 Why testers choose Selenium over QTP • Selenium is an open source tool and is specifically designed to test web based applications • There are several browsers supported by Selenium, while QTP just supports Internet Explorers on Windows • Selenium supports different programming languages, while QTP only supports VB script
10 What is the use of XPath? • XPath is a Selenium technique to navigate through a webpage’s HTML structure <xpath>
10 What is the use of XPath? • XPath is a Selenium technique to navigate through a webpage’s HTML structure • It uses the XML path expression to locate elements on a webpage <xpath>
11 How can you locate a web element in Selenium? Selenium uses locators to locate and identify web elements. There are different types of locators in Selenium
11 How can you locate a web element in Selenium? Selenium uses locators to locate and identify web elements. There are different types of locators in Selenium
12 Name the different types of WebDriver APIs • Different types of WebDriver APIs in Selenium are: • AndroidDriver • ChromeDriver • EventFiringWebDriver • FirefoxDriver • HtmlUnitDriver • InternetExplorerDriver • iPhoneDriver • iPhoneSimulatorDriver • RemoteWebDriver
13 What does a slash signify in XPath? What is the difference between single and double slash? The XPath syntaxes are path expressions that are used for addressing into a document. Slashes are used to create XPath with an absolute or relative path
13 What does a slash signify in XPath? What is the difference between single and double slash? The XPath syntaxes are path expressions that are used for addressing into a document. Slashes are used to create XPath with an absolute or relative path Signal slash creates XPath with an absolute path, which means that XPath would be made to begin selecting from the start node /html/body/div[2]/div[1]/div[1]/a Double slash creates XPath with a relative path, which means that XPath would be made to begin selecting from anywhere in the document //div[class="qa-logo"]/a
14 Explain Absolute XPath and Relative XPath • Absolute XPath is a direct way of finding an element • The drawback is that if there are any changes in the elements path then XPath will fail • Relative XPath begins from the middle of the HTML DOM structure • It enables writing from the middle of the HTML DOM structure without any need to write a long XPath Absolute XPath Relative XPath
14 Explain Absolute XPath and Relative XPath • Absolute XPath is a direct way of finding an element • The drawback is that if there are any changes in the elements path then XPath will fail • Relative XPath begins from the middle of the HTML DOM structure • It enables writing from the middle of the HTML DOM structure without any need to write a long XPath Absolute XPath Relative XPath Absolute XPath:/html/body/div[1]/div/div[2]/header/div/div[2]/a/img Relative XPath://*[@id=”block-perfecto-main-menu”]/ul/li[6]/a
15 Name some Automation tools that can be integrated with Selenium to achieve Continuous testing • Selenium can be integrated with tools like: • Maven • Jenkins • Docker • TestNG • JUnit
16 Differentiate between verify and assert commands Assert command and Verify command both are used in the test suites to add validations to the test methods. The major difference between the two is :
16 Differentiate between verify and assert commands Assert command and Verify command both are used in the test suites to add validations to the test methods. The major difference between the two is : In the case of Verify command even though the test may be marked as fail if an assertion statement fails, but the test method continues to execute. In the case of Assert command when the validation fails the execution of that test is stopped and the test method is then marked as failed
17 What are the different types of JUnit annotations which are used in Selenium? • Different types of JUnit annotations used are: • Test • Before • After • BeforeClass • AfterClass • Ignore • RunWith
18 How is TestNG better than JUnit? • TestNG and JUnit are testing frameworks used for Unit Testing
18 How is TestNG better than JUnit? • TestNG and JUnit are testing frameworks used for Unit Testing • There are more functionalities added to TestNG which makes it more powerful than JUnit
18 How is TestNG better than JUnit? • TestNG and JUnit are testing frameworks used for Unit Testing • There are more functionalities added to TestNG which makes it more powerful than JUnit • TestNG enables dependency testing which isn’t there in JUnit
19 What are the different types of Selenium Framework? Selenium Framework Keyword Driven Framework Data-Driven Framework Hybrid Framework
20 What is Data-Driven and Keyword Driven? Data-Driven framework • Data-Driven Framework is based on several data sets generated in an external file and then imported in the automation testing tool
20 What is Data-Driven and Keyword Driven? Data-Driven framework • Data-Driven Framework is based on several data sets generated in an external file and then imported in the automation testing tool • Hence the test data is generated from external files like Excel, CSV, or XML
20 What is Data-Driven and Keyword Driven? Data-Driven framework • Data-Driven Framework is based on several data sets generated in an external file and then imported in the automation testing tool • Hence the test data is generated from external files like Excel, CSV, or XML • The data sets are separate from the original script from which the required input may be fetched
20 What is Data-Driven and Keyword Driven? Keyword-Driven framework • Keyword-Driven Framework focuses on speeding up the automation testing by separating the code from the test case and test step