Online Exam Quiz

questionQuestion  1 to 30

Which of the following commands is used to close the browser in Selenium WebDriver?

  • close()
  • quit()
  • exit()
  • terminate()
Mark for review

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

  • scrollTo()
  • moveToElement()
  • executeScript()
  • scrollToElement()
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 purpose of the "driver.navigate().back()" method in Selenium?

  • To go back to the previous page in the browser history
  • To navigate to a new URL
  • To reload the current page
  • To go forward in the browser history
Mark for review

How can you handle multiple popups or alerts in Selenium WebDriver?

  • By using the Alert interface
  • By using windowHandles() method
  • By using the driver.switchTo().window() method
  • All of the above
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

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

How do you handle dropdowns in Selenium WebDriver?

  • By using the Select class
  • By using selectByValue() method
  • By using selectByIndex() method
  • All of the above
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

How can we handle timeouts in Selenium WebDriver?

  • By using Thread.sleep()
  • By using WebDriverWait with timeout settings
  • By using explicit wait only
  • By using implicit wait only
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

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

How can you handle file upload in Selenium WebDriver?

  • By interacting with file input fields and sending the file path using sendKeys()
  • By using drag-and-drop functionality
  • By using AutoIT script
  • Both 1 and 3
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

How can you handle mouse movements in Selenium WebDriver?

  • Using Actions class
  • Using mouseMove() method
  • Using moveTo() method
  • None of the above
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 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

What is the advantage of using the Page Object Model (POM) in Selenium?

  • It allows test scripts to be reusable and maintainable
  • It simplifies the test data management
  • It speeds up the execution of tests
  • None of the above
Mark for review

What is the role of the ?sendKeys()? method in Selenium WebDriver?

  • To simulate keyboard input for text fields
  • To click on elements
  • To scroll through the page
  • To submit forms
Mark for review

How do you take a screenshot in Selenium WebDriver?

  • Using the TakesScreenshot interface
  • Using driver.screenshot() method
  • Using captureScreen() method
  • All of the above
Mark for review

How can you execute tests on multiple browsers in parallel using Selenium?

  • By using Selenium WebDriver?s parallel execution feature
  • By using Selenium Grid
  • By running tests on different machines
  • Selenium does not support parallel execution
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 the default timeout for implicit wait in Selenium WebDriver?

  • 30 seconds
  • 60 seconds
  • 10 seconds
  • No default timeout
Mark for review

What is the role of the "WebDriverWait" class in Selenium WebDriver?

  • To wait for a certain condition to be true before continuing
  • To pause the test execution for a fixed time
  • To load a page completely
  • To wait for a JavaScript alert
Mark for review

What is the benefit of using WebDriver?s fluent wait?

  • It waits for an element to appear within a specific time period with dynamic polling intervals
  • It stops execution when an element is found
  • It is faster than explicit wait
  • It is easier to implement
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

How can you execute tests on multiple machines using Selenium?

  • By using Selenium Grid
  • By using WebDriver parallel execution feature
  • By using multiple browsers on the same machine
  • None of the above
Mark for review

How do you check if an element is present in Selenium WebDriver?

  • Using isPresent() method
  • Using findElement() method
  • Using isDisplayed() method
  • Using getElement() method
Mark for review

What is the use of Selenium WebDriver?s "navigate()" method?

  • To load a new page in the browser
  • To get the title of the page
  • To move backward or forward in the browser?s history
  • To find elements on the page
Mark for review

How can we interact with checkboxes in Selenium WebDriver?

  • Using check() method
  • Using click() method
  • Using select() method
  • Using press() method
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