Online Exam Quiz

questionQuestion  1 to 30

What is the role of the ?Actions? class in Selenium?

  • To simulate complex user gestures like drag-and-drop
  • To handle web element interactions
  • To execute JavaScript commands
  • None of the above
Mark for review

What is the purpose of the Selenium IDE?

  • To automate WebDriver scripts
  • To record and playback test cases in a browser
  • To manage Selenium Grid
  • To manage test reporting
Mark for review

How can you wait for an element to be visible before interacting with it in Selenium?

  • Using Thread.sleep()
  • Using implicitlyWait()
  • Using WebDriverWait with ExpectedConditions
  • Using waitFor()
Mark for review

How can you simulate keyboard events in Selenium?

  • Using the Actions class
  • Using sendKeys() method
  • Using the executeScript() method
  • All of the above
Mark for review

What is Selenium Grid used for?

  • To run tests on a single machine
  • To execute tests on multiple machines and browsers simultaneously
  • To record user actions
  • To generate reports for test results
Mark for review

What is the role of Selenium WebDriver?

  • It is used to record user actions
  • It simulates the behavior of a real user in a browser
  • It provides a GUI for writing test scripts
  • It manages multiple tests in parallel
Mark for review

What is the default behavior of an implicit wait in Selenium WebDriver?

  • It is applied for all elements in the test
  • It is only applied for certain elements
  • It applies only when using XPath
  • It applies only when using CSS selectors
Mark for review

Which method is used to find a single element by XPath in Selenium?

  • findElementByXPath()
  • driver.findElement()
  • findByXPath()
  • element.findElement()
Mark for review

What is an implicit wait in Selenium WebDriver?

  • A wait time for the entire test suite
  • A wait time for the element to be found in the DOM
  • A wait time before the browser closes
  • A wait time before the test execution begins
Mark for review

Which method is used to simulate mouse movement to an element in Selenium?

  • moveToElement()
  • mouseMoveTo()
  • moveTo()
  • hoverOver()
Mark for review

Which of the following is NOT a component of Selenium?

  • Selenium WebDriver
  • Selenium Grid
  • Selenium IDE
  • Selenium Manager
Mark for review

What is the main purpose of Selenium WebDriver?

  • Automating browser actions
  • Testing APIs
  • Automating database interactions
  • Automating desktop applications
Mark for review

How can we take a screenshot of a webpage using Selenium WebDriver?

  • Using TakesScreenshot interface
  • Using getScreenshot() method
  • Using capture() method
  • Using screenshot() method
Mark for review

How do you perform mouse hover actions in Selenium WebDriver?

  • Using clickAndHold() method
  • Using moveToElement() method
  • Using doubleClick() method
  • None of the above
Mark for review

What is the purpose of using the "driver.manage().window().maximize()" method in Selenium?

  • To maximize the browser window
  • To minimize the browser window
  • To maximize all browser windows
  • None of the above
Mark for review

Which of the following is used to perform a right-click on an element in Selenium WebDriver?

  • contextClick()
  • rightClick()
  • doubleClick()
  • None of the above
Mark for review

What is the purpose of the FluentWait in Selenium?

  • To wait until the element is visible
  • To handle dynamic wait conditions with polling interval and timeout
  • To set a default wait time for all elements
  • To pause execution for a fixed time period
Mark for review

How do you close a specific browser window in Selenium?

  • Using driver.quit()
  • Using driver.close()
  • Using driver.exit()
  • Using driver.end()
Mark for review

What does the ?driver.manage().timeouts().implicitlyWait()? method do?

  • Sets a global wait time for finding elements
  • Stops the execution for a specified time
  • Waits for an element to be clickable
  • Waits for page load
Mark for review

Which of the following is true about Selenium WebDriver?

  • It only works with Chrome browser
  • It can work with multiple browsers
  • It is only used for API testing
  • It doesn?t support JavaScript execution
Mark for review

How do you handle multiple windows in Selenium WebDriver?

  • Using the windowHandles() method
  • Using the switchTo() method
  • Using getWindowHandles() method
  • Both 2 and 3
Mark for review

Which method is used to open a browser window in Selenium WebDriver?

  • get()
  • open()
  • start()
  • launch()
Mark for review

How can you check if an element is selected in Selenium?

  • Using isSelected() method
  • Using getSelected() method
  • Using isDisplayed() method
  • Using getText() method
Mark for review

How do you simulate pressing the "TAB" key in Selenium WebDriver?

  • Using sendKeys(Keys.TAB)
  • Using pressKey(Keys.TAB)
  • Using sendKeys(Keys.Enter)
  • Using simulateKeys(Keys.TAB)
Mark for review

What is the difference between driver.close() and driver.quit() in Selenium?

  • driver.close() closes the current window, while driver.quit() closes all browser windows
  • driver.quit() only closes the current window
  • driver.close() closes all windows, while driver.quit() closes none
  • There is no difference
Mark for review

Which of the following methods can be used to find multiple elements in Selenium?

  • findElements()
  • findElementsByXPath()
  • findAllElements()
  • None of the above
Mark for review

What method in Selenium WebDriver is used to scroll to an element?

  • scrollTo()
  • moveToElement()
  • executeScript()
  • scrollToElement()
Mark for review

What is the function of the "driver.switchTo().alert().accept()" method?

  • To dismiss an alert
  • To accept the alert
  • To retrieve the alert text
  • To navigate to the next page
Mark for review

How do you perform a drag-and-drop operation using Selenium WebDriver?

  • Using dragAndDrop() method
  • Using moveToElement() and clickAndHold() methods
  • Using Actions class with dragAndDrop()
  • All of the above
Mark for review

Which method is used in Selenium WebDriver to simulate the pressing of the "Enter" key?

  • sendKeys()
  • pressEnter()
  • keyPress()
  • submit()
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review