Online Exam Quiz

questionQuestion  1 to 30

Which Selenium class is used for performing keyboard and mouse actions?

  • WebDriver
  • WebElement
  • Actions
  • Robot
Mark for review

How do you handle JavaScript alerts in Selenium?

  • alert().switch()
  • driver.switchTo().alert()
  • jsAlert.handle()
  • alert().dismiss()
Mark for review

Which assertion library is used with Selenium and TestNG?

  • Log4j
  • Assert
  • JUnit
  • Fluent
Mark for review

What happens if an assertion fails in TestNG?

  • Test halts
  • Skips test
  • Continues execution
  • Logs warning
Mark for review

In Maven, which file defines dependencies?

  • pom.xml
  • build.gradle
  • dependencies.xml
  • config.json
Mark for review

What does driver.manage().timeouts().implicitlyWait() set?

  • Page load time
  • Timeout for script
  • Wait time for finding elements
  • Max wait for alerts
Mark for review

Explicit waits are used to:

  • Wait for a specific condition
  • Stop execution permanently
  • Force browser refresh
  • Wait for script load
Mark for review

How do you run tests in multiple browsers using Selenium?

  • Enable compatibility mode
  • Use WebDriverManager
  • Cross-browser test framework
  • Define capabilities for each browser
Mark for review

What is XPath in Selenium?

  • A URL
  • A scripting language
  • A locator strategy
  • A plugin
Mark for review

Which command prints log messages in Java tests?

  • log.info
  • print()
  • println()
  • System.out.println()
Mark for review

What is the use of driver.getWindowHandle()?

  • Get session ID
  • Get tab ID
  • Get current window ID
  • Get cookies
Mark for review

Which Selenium component supports test parallelization?

  • IDE
  • RC
  • Grid
  • WebElement
Mark for review

Implicit waits in Selenium are used to:

  • Delay script execution
  • Wait for elements to appear
  • Pause for test data
  • Wait for user input
Mark for review

Which of these is NOT handled by WebDriver directly?

  • Alerts
  • File uploads
  • Windows
  • Video streaming
Mark for review

Which language is NOT supported by Selenium WebDriver?

  • Java
  • Python
  • PHP
  • COBOL
Mark for review

Which annotation is used in PageFactory?

  • @FindElement
  • @FindBy
  • @Locator
  • @Element
Mark for review

How do you maximize the browser window?

  • window().max()
  • driver.maximize()
  • driver.manage().window().maximize()
  • browser.max()
Mark for review

What is JavascriptExecutor used for?

  • Trigger alerts
  • Execute JavaScript in browser
  • Handle test data
  • Close browser
Mark for review

How do you verify if a checkbox is selected?

  • checkbox.click()
  • checkbox.getText()
  • checkbox.isSelected()
  • checkbox.isDisplayed()
Mark for review

What does driver.findElement(By.id("username")) do?

  • Returns a window
  • Returns a list
  • Returns a single web element
  • Returns page title
Mark for review

What is TestNG in the context of Selenium?

  • A logging tool
  • A reporting tool
  • A testing framework
  • A debugging library
Mark for review

Which of the following is a WebDriver interface method?

  • start()
  • navigate()
  • open()
  • link()
Mark for review

Which tool is commonly used with Selenium for reporting?

  • Maven
  • Jenkins
  • ExtentReports
  • Postman
Mark for review

Which of the following is NOT a locator in Selenium?

  • ByCSS
  • ByXPath
  • ByValue
  • ByName
Mark for review

Which plugin integrates TestNG with Jenkins?

  • Surefire
  • Allure
  • ExtentReports
  • SeleniumRunner
Mark for review

What is the return type of getCurrentUrl() in Selenium?

  • int
  • boolean
  • String
  • URL
Mark for review

In TestNG, which annotation is used before each test method?

  • @TestCase
  • @BeforeClass
  • @BeforeMethod
  • @BeforeRun
Mark for review

What is the benefit of using PageFactory?

  • Improves runtime
  • Delays execution
  • Initializes web elements efficiently
  • Hides driver logs
Mark for review

Selenium can be integrated with which CI/CD tool?

  • Jenkins
  • Tableau
  • Docker
  • Burp Suite
Mark for review

What is the major limitation of Selenium WebDriver?

  • It can't test web apps
  • No support for desktop apps
  • Can?t open browsers
  • Doesn?t support Java
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