WebDriver Java, Cucumber, and Cypress Test Welcome to your Quiz, this will include questions on: Selenium Java Java Programming Cucumber REST API Cypress You will have 35 minutes to complete 25 questions. Please do not close your web browser until you have finished. Please do not click the top 'Next' button as this takes you to another quiz. Only the buttons at bottom of page! If the time runs out, your answers will be automatically sent and the quiz finished (Please check your spam folder if you don't receive it promptly). After the quiz, you will be emailed your results. Please enter your name & email address and GOOD LUCK!! Name Email 1. What are the 3 main applications in the Selenium development project? Selenium, WebDriver, Cypress WebDriver, Selenium IDE, Selenium Server Selenium IDE, Selenium Grid, Cypress Selenium Java, Selenium C#, Selenium Server None 2. What type of Selenium Wait is this: driver.manage().timeouts() .implicitlyWait(Duration.ofSeconds(10)); Implicit Explicit None 3. BDD best practice, what is the recommended number of steps for a Scenario? 1-3 5-20 3-5 >20 None 4. What 'By' Methods does WebDriver Java support for idetifying elements by their text? Tick 2 that apply linkText Text partialLinkText partialText 5. CSS, what is the '#' character shorthand for? html id html name class None 6. In Cucumber, in a Feature File, when does the 'Background' step get executed? Only once, before any Sceanrios are executed After all Sceanrios are completed Before each Sceanrio in the Feature file Only before the next Sceanrio that follow it None 7. What is usally contained in the 'Fixtures' folder in the Cypress directory structure? Test Data Custom Commands WebDriver Hooks Global Hooks None 8. When you install Cypress, what components are included? Tick 3 that apply Cypress Cucumber JUnit Mocha Chai 9. In Cucumber Gherkin, if we define a @Tag at the Feature level, what does this imply? The Tag will be inherited by every Sceanrio in the Feature The Tag is ignored Only the Feature will execute, not the Sceanrios None 10. In Cucumber Gherkin, what symbol defines a comment @ -- // # None 11. In JUnit, what annotation defines a Test Case? @Before @TestCase @Test @Scenario None 12. How can we force execution order for Tests using JUnit? (n = number) @Order(n) @n @Run(n) @(n) None 13. In WebDriver, the PageFactory Class allows simple element identification annotations, which of these is the correct syntax: @FindBy (linkText="Login") WebElement loginLink; @Find (linkText="Login") WebElement loginLink; @By (linkText="Login") WebElement loginLink; @FindBy (linkText="Login") loginLink; None 14. What does the acronym POM stand for in WebDriver? Page Of Modelled elements Pages of Managed Objects Page Object Model Plain Old Models None 15. What types of Test Cases are most suitable for test Automation? Tick 4 that apply Regression Tests Repeated Tests Complicated tests that span several applications Simple Tests that are manually laborious Tests that are repeated many times, and each time with different test data Usability tests 16. Selenium WebDriver is available in which language bindings? select all that apply Java C# JavaScript Ruby Python 17. In Java, what is a Class 'Constructor' The outline definition of the Class itself A 'Property' of the Class A Class 'Field' that gets accessed statically A 'Method' that gets invoked automatically when the class is instantiated None 18. When executing Cypress tests from the command line, which is the correct parameter config to run Chrome in Headed mode npx cypress run --browser --chrome npx cypress run -headed -browser chrome npx cypress run --gui --browser --chrome npx cypress run --headed --browser chrome None 19. In Cypress/Mocha, what annotation is used to define a Test Suite? describe it Scenario Feature Suite None 20. When writing to the log in Cypress, why is it best to use cy.log() instead of console.log()? cy.log puts the log message in bold cy.log executes faster due to the async nature of JavaScript, console.log may not execute when expected due to the async nature of JavaScript, cy.log may not execute when expected None 21. In WebDriver, how do you capture the text of an input element .getAttribute("text") .getAttribute("value") .getText() .text() None 22. What will happen in this Java loop? int x=5; while (x=5) { x++; } System.out.println("finished"); The loop will iterate once and then print "finished" The loop will not iterate at all, we just get "finished" printed The code will not compile The loop will iterate indefinitely None 23. If a Web Server returns a response code of '401' what does this imply? Forbidden Success OK Not Found Unauthorized Service unavailable None 24. Using a REST API Request, how do we update an existing resource? PUT POST DELETE GET CHANGE VIEW None 25. In a Cucumber Scenario, we have a number of Steps defined in different Class files that need to share data. What is the best approach? Instance Fields Static Fields Context Injection Parameterization None By Tom Millichamp|2022-09-21T11:31:18+00:00March 21st, 2022|Comments Off on WebDriver Java, Cucumber, and Cypress Test Share This Story, Choose Your Platform! FacebookXRedditLinkedInPinterestVk About the Author: Tom Millichamp Tom has been involved in automated software testing for over 20 years, both as a trainer and consultant. He is both an HP/Microfocus & Ranorex certified trainer.