Online Exam Quiz

questionQuestion  1 to 30

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

How does Selenium WebDriver interact with dynamic elements?

  • By using CSS selectors
  • By using XPath or other locators
  • By using explicit waits
  • All of the above
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

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

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

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

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

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 WebDriverWait in Selenium?

  • It waits for a condition to be true before proceeding with the execution
  • It pauses the test execution for a fixed time period
  • It waits until the page is loaded
  • It waits until an element becomes visible
Mark for review

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

  • driver.switchTo().window()
  • driver.switchTo().windowHandles()
  • switchTo().newWindow()
  • 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

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 do you locate elements in Selenium WebDriver?

  • By CSS Selectors
  • By XPath
  • By ID
  • All of the above
Mark for review

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

Which language is NOT supported by Selenium?

  • Java
  • Python
  • C#
  • Ruby
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

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

Which of the following is used to perform a mouse hover action in Selenium?

  • moveToElement()
  • mouseHover()
  • hoverMouse()
  • None of the above
Mark for review

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

  • sendKeys()
  • pressEnter()
  • click()
  • submit()
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

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

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

How do you perform right-click actions on an element in Selenium WebDriver?

  • Using rightClick() method
  • Using contextClick() method
  • Using clickAndHold() method
  • 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

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 in WebDriver waits for an element to be visible for a specified duration?

  • WebDriverWait
  • Thread.sleep()
  • implicitWait()
  • FluentWait()
Mark for review

How can you execute JavaScript through Selenium WebDriver?

  • Using the executeScript() method
  • Using the runJavaScript() method
  • Using the executeJavaScript() method
  • Selenium does not support JavaScript execution
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 commands is used to close the browser in Selenium WebDriver?

  • close()
  • quit()
  • exit()
  • terminate()
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

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