Selenium Beginner Welcome to your Selenium Beginner A selenium tester wants to log information before, after and during an event is triggered. Which Selenium feature can be used to achieve this goal? Use Selenium Remote Control Use Web driver Listener Use Selenium Support Class Use a third-party testing tool like TestNG to achieve this None A tester wants to store web elements of the Application Under Test (AUT) together with their locator values, in one or more centralized locations as opposed to hard coding them within the test scripts. Which of the following can be used to achieve this? object repository element library element stack object book None Each web page in the application is required to have its own corresponding page class. The page class is thus responsible for finding the WebElements in that page and then perform operations on those WebElements. In Selenium, what is the name of this Design pattern? WDP (Web Design Pattern) PDM (Page Design Model) POM (Page Object Model) DOM (Document Object Model) None How can you a take a screenshot using Selenium WebDriver? File screenshotFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); Screenshot screenshotFile = ((TakesScreenshot)driver); File screenshotFile = driver.getScreenshotAs(); Screenshot screenshotFile = driver.getScreenshotAs(); None A web page throws a confirmation/alert pop-up box and to continue the automation process the program needs to reject/cancel the alert message and go to the next step in the test script. How can this be done? driver.switchTo().alert().accept(); driver.alert().dismiss(); driver.alert().accept(); driver.switchTo().alert().dismiss(); None In a testing operation, a tester wants to continue the execution even if there is a failure in the testing process so that other test cases can be verified and the operation is not stuck at a single point of failure. The tester finds that every time the test script faces an execution error the test script stops and does not go to the next testing stage. The script uses Junit Assert class. Which one of the following statements is true? Note: There can be multiple correct answers to this question. Test scripts should not continue if there is an exception If the Assertion is inside a try-catch block, it will always stop the script if the assertion fails Assertions do not allow you to continue operation if there is an exception Move the assertion inside a try-catch block to allow the script to continue in case of an error Use Verify instead of Assert None How do you attach a file from local storage to a webpage attachment content element? uploadElement.sendKeys("C:\\myFile.pdf"); //then no need to submit the form element of form uploadElement.sendKeys("C:\\ myFile.pdf "); driver.FindElement(By.name("send")).click(); driver.switchto(uploadElement); uploadElement.sendKeys("C:\\ myFile.pdf "); All of the above None Implicit wait can be used to: Wait for a page to load To look for a specific element on a page and timeout if the element does not load within the specified value To halt the execution until the time a particular execution condition is met Only 1 Only 3 Both 1 and 3 Both 1 and 2 All 1, 2 and 3 None Which of the following locator type is not available in Selenium? ID ClassName SQLPath XPath None What is DOM? The Document Object Model (DOM) is an API for valid HTML and well-formed XML documents. It is a W3C standard The Domain Object Model (DOM) is an API built into Selenium to find elements on HTML pages. Another name for DOM is WebDriver The Domain Object Model is an API for testing web pages used by JUnit and TestNG None of the above None Your new question! None Time's up Posted in .