Selenium Automation Quiz # 2

Instructions
Quiz: Selenium Automation Quiz # 2
Subject: Basic Selenium Automation
Total Questions: 98 MCQs
Time: 98 Minutes

Note

  • Do not refresh the page while taking the test.
  • Results along with correct answers will be shown at the end of the test.
Selenium Automation Quiz # 2
Question 1 of 98
00:00
  • Choose True or False.

    While running tests with RemoteWebDriver or Selenium-Grid. you can take screenshots.


  • Which of the following is the correct syntax of the method that is used for performing double click on an element?

  • In Order to mouse hover on a web element using WebDriver? Is the below written code uses the correct syntax and code

    // lnstantiating Action Interface

    Actions actions=new Actions(driver);

    ll howering on the dropdown

    actionsmoveToElement(driver.f‌indElement(By.id("id of the dropdown"))).perform();

    // Clicking on one of the items in the list options

    WebElernent subLinkOption=driver.findElement(By.id("id of the sub |ink"));

    subLinkOption.click();


  • How to import Selenium's TimeoutException in Python?

  • While testing an application in Selenium, which of the following should either not be used at all or should be minimally used?

  • Which of the following WebDriver methods is used to change focus to an alert, a frame or a browser window?

  • Which of the following statements is incorrect?

  • Which of the following is the correct syntax of the method that is used for directly accessing the alert box in Selenium?

  • Select the correct the WebDriver methods to manage web-based alerts?

    1.dismiss()

    2.accept0

    3.ignore()

    4.sendKeys(String stringToSend)

    5.getText()


  • Which method is used when you want to verify whether a certain check box, radio button, or Option in drop-down box is selected in Web driver Selenium ?

  • Which of the following Selenium methods defines whether an element is visible and enabled?

  • While working with multiple frames, when the test f‌low needs to be moved to another frame after the completion of an operation on the previous frame, which of the following methods should be called first?

  • When a conf‌irmation is generated. which of the following options must be called to consume it in order to avoid failure of the next Selenium action?

  • Which of the following options should be used in your test case if you want the failure of any test to abort the current test case?

  • Which of the following is the correct command that causes the Node to be spawned and a new servlet "org.abc.mydemo.AlINodes" to be added to the node?

  • Which of the following is the correct path for accessing all the servlets added to the node running on port 5555?

    Consider abc as the machine name or ip on which the node is running.


  • Which of the following is/are the correct reason(s) for using Selenium-Grid?

    i) For running tests against multiple browsers.

    ii) For running tests against browsers running on different operating systems.

    iii) For reducing the time taken by the test suite to complete a test pass.

    iv) For running the test using Internet Explorer Driver on Mac OS or Unix.

    v) For running tests with slow speed.


  • Which of the following statements is correctly def‌ining the Time-out test in TestNG?

  • Which Of the following is correct about tag and attribute name for HtmlUnit Driver?

  • ln Selenium, up to how many parameters can be passed to an action method?

  • Which Of the following commands are automatically available when you add a getTextLengthO method?

    0 storeTextLength

    ii) assertNotTextLength

    iii) assertValueRepeated

    iv) verifyTextLength


  • Which of the following is the correct Java syntax for retrieving the innerText value contained within an element?

  • Carefully analyze the following element given in a WebDriver and answer the question that follows it.

    Car
    bus

    Which of the following is the correct Java command that can be used for locating the above—given element by class name?


  • Select the Correct navigation methods of WebDriver?

    1. goto()

    2. moveto()

    3. forward()

    4. back()

    5. refresh()

  • Which ofthe following methods makes an expectation for checking that an element, known to be present on the DOM of a page, is visible?

  • Which of the following is a valid difference between and commands?

    1.command checks whether an element is on the page or not and stops the test on failure whereas command carries on executing the tests.

    2. command checks the visibility of element whereas command tests the condition for true or false.


  • Select the Correct Navigation Commands ?

    1) navigate0.back0

    Sample code:

    driver.navigate0.back();

    2) navigate0.fon~ard0

    Sample code:

    driver.navigate0.fon~ard();

    3) navigate0.refresh()

    Sample code:

    drivennavigate0.refresh0;

    4) navigateOtoO

    Sample code:

    driver.navigateO.to("https://goog|e.com");


  • Which Of the following Selenium commands can print a specif‌ied message into the third table cell Of your Selenese table and is also useful for debugging?

  • Which is not a valid setUp/tearDown level in TestNG framework?

  • Which Of the following commands is a Selenium accessors command?

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it