Online Exam Quiz

questionQuestion  1 to 30

Which of the following is the correct syntax to type text into a text box using Selenium WebDriver?

  • driver.findElement().sendKeys("text")
  • driver.findElement().enterText("text")
  • driver.findElement().type("text")
  • driver.findElement().setValue("text")
Mark for review

How can we handle file uploads in Selenium WebDriver?

  • By sending file paths using sendKeys() on the file input field
  • By using drag-and-drop actions
  • By using AutoIT scripts
  • Both 1 and 3
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

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 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

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

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

Which of the following is NOT a valid WebDriver command?

  • findElement()
  • findElements()
  • click()
  • submit()
Mark for review

Which of the following WebDriver methods is used to switch between frames?

  • switchTo().frame()
  • driver.switchTo().frame()
  • switchFrame()
  • driver.switchToFrame()
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

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

How do you perform double-click actions in Selenium WebDriver?

  • Using doubleClick() method
  • Using clickAndDoubleClick() method
  • Using performDoubleClick() method
  • None of the above
Mark for review

Which method in Selenium WebDriver is used to switch between frames?

  • switchTo().frame()
  • driver.switchTo().frame()
  • frame.switchTo()
  • driver.switch()
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 does Selenium WebDriver?s ?getCurrentUrl()? method return?

  • The title of the page
  • The URL of the current page
  • The page source
  • None of the above
Mark for review

What does the "driver.getWindowHandles()" method return in Selenium?

  • The current window URL
  • A list of all window handles
  • The source code of the page
  • None of the above
Mark for review

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

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

What is the purpose of the ?driver.manage().timeouts().pageLoadTimeout()? method?

  • To set the timeout for the page load
  • To set the timeout for finding elements
  • To set the implicit wait timeout
  • To set the maximum wait time for a test case
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

How does Selenium WebDriver handle dynamic web elements?

  • By using static element locators
  • By using XPath or CSS selectors
  • By using explicit wait with ExpectedConditions
  • All of the above
Mark for review

Which of the following Selenium WebDriver methods is used to verify whether an element is displayed?

  • isVisible()
  • isDisplayed()
  • getVisibility()
  • verifyDisplay()
Mark for review

What is the default timeout for implicit waits in Selenium WebDriver?

  • 10 seconds
  • 30 seconds
  • 60 seconds
  • 5 seconds
Mark for review

How do you simulate a keyboard action like pressing the "Enter" key in Selenium WebDriver?

  • Using sendKeys() method with Keys.ENTER
  • Using keyPress() method
  • Using sendKeys() method with Key.ENTER
  • None of the above
Mark for review

How can you locate an element using XPath?

  • By element ID
  • By CSS selectors
  • By text or attributes
  • All of the above
Mark for review

Which of the following is used to navigate to a specific URL in Selenium WebDriver?

  • goTo()
  • navigate()
  • get()
  • openURL()
Mark for review

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

  • drag()
  • moveToElement()
  • dragAndDrop()
  • clickAndHold()
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

How can you maximize a browser window in Selenium WebDriver?

  • driver.manage().window().maximize()
  • driver.maximize()
  • driver.resize()
  • driver.setWindowSize()
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

Which of the following is true about Selenium WebDriver?

  • It supports multiple browsers
  • It only supports Chrome
  • It supports only Firefox
  • It doesn?t support Internet Explorer
Mark for review

What is the purpose of Selenium?s Actions class?

  • To simulate user gestures like mouse movement, drag-and-drop, etc.
  • To handle browser alerts
  • To perform actions on dynamic elements
  • To execute JavaScript commands
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