placeholder image to represent content

Selenium Functions

Quiz by Viji Gripsy PSGRKCW

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
20 questions
Show answers
  • Q1
    How do you check if a checkbox is checked in Selenium?
    checkboxElement.check();
    checkboxElement.isSelected();
    checkboxElement.isChecked();
    checkboxElement.checked();
    30s
  • Q2
    What is the purpose of data-driven testing in Selenium?
    To execute JavaScript commands only
    To test only the graphical interface
    To run tests with multiple data sets
    To minimize the browser window
    30s
  • Q3
    How can you report the results of tests in Selenium?
    By writing results to a text file only
    Using testNG or JUnit frameworks
    By printing directly to the console
    By using an external graphics library
    30s
  • Q4
    Which Selenium command can be used to switch to a new browser window or tab?
    driver.changeWindow(windowHandle);
    driver.switchTo().window(windowHandle);
    driver.openWindow();
    driver.switchTo().newWindow();
    30s
  • Q5
    What is the function of the 'DataProvider' annotation in TestNG?
    To run tests in parallel
    To set up browser configurations
    To document test cases
    To provide test data for parameterized tests
    30s
  • Q6
    What method can you use to minimize the browser window in Selenium?
    driver.reduceWindow();
    driver.manage().window().shrink();
    driver.window().minimize();
    driver.manage().window().minimize();
    30s
  • Q7
    Which method is used in Selenium to check if a radio button is selected?
    checkStatus()
    isSelected()
    isRadioSelected()
    isChecked()
    30s
  • Q8
    What is the primary use of XPath in Selenium?
    To handle file downloads
    To locate elements in a web page
    To execute JavaScript code
    To manage browser cookies
    30s
  • Q9
    Which method is used in Selenium to select an item from a dropdown list?
    dropdownSelectByText()
    selectOption()
    selectByVisibleText()
    chooseOptionByText()
    30s
  • Q10
    Which Selenium command can be used to maximize the browser window?
    driver.manage().window().maximize();
    driver.manage().window().fullScreen();
    driver.window().max();
    driver.maximize();
    30s
  • Q11
    Which Selenium function can be used to maximize the browser window in JavaScript?
    driver.setWindowSize();
    driver.maximizeWindow();
    driver.manage().window().maximize();
    driver.window().expand();
    30s
  • Q12
    What method would you use in Selenium to select an option from a dropdown list?
    Choose(By.xpath("option xpath"));
    Select(By.visibleText("option text"));
    Dropdown.Select("option value");
    Option.selectByText("option text");
    30s
  • Q13
    Which method is used to check if a checkbox is selected in Selenium?
    isChecked();
    check();
    selectCheckbox();
    isSelected();
    30s
  • Q14
    In Selenium, which XPath expression would you use to find an input element by its 'name' attribute?
    //input[name='elementName']
    //input(@name='elementName')
    //input[@name='elementName']
    //input/name='elementName'
    30s
  • Q15
    What is the primary purpose of parameterization in data-driven testing using Selenium?
    To validate application performance under load.
    To randomize test case execution order.
    To run the same test with different inputs.
    To verify UI layouts across different resolutions.
    30s

Teachers give this quiz to your class