
Selenium Functions
Quiz by Viji Gripsy PSGRKCW
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
20 questions
Show answers
- Q1How do you check if a checkbox is checked in Selenium?checkboxElement.check();checkboxElement.isSelected();checkboxElement.isChecked();checkboxElement.checked();30s
- Q2What is the purpose of data-driven testing in Selenium?To execute JavaScript commands onlyTo test only the graphical interfaceTo run tests with multiple data setsTo minimize the browser window30s
- Q3How can you report the results of tests in Selenium?By writing results to a text file onlyUsing testNG or JUnit frameworksBy printing directly to the consoleBy using an external graphics library30s
- Q4Which 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
- Q5What is the function of the 'DataProvider' annotation in TestNG?To run tests in parallelTo set up browser configurationsTo document test casesTo provide test data for parameterized tests30s
- Q6What 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
- Q7Which method is used in Selenium to check if a radio button is selected?checkStatus()isSelected()isRadioSelected()isChecked()30s
- Q8What is the primary use of XPath in Selenium?To handle file downloadsTo locate elements in a web pageTo execute JavaScript codeTo manage browser cookies30s
- Q9Which method is used in Selenium to select an item from a dropdown list?dropdownSelectByText()selectOption()selectByVisibleText()chooseOptionByText()30s
- Q10Which Selenium command can be used to maximize the browser window?driver.manage().window().maximize();driver.manage().window().fullScreen();driver.window().max();driver.maximize();30s
- Q11Which Selenium function can be used to maximize the browser window in JavaScript?driver.setWindowSize();driver.maximizeWindow();driver.manage().window().maximize();driver.window().expand();30s
- Q12What 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
- Q13Which method is used to check if a checkbox is selected in Selenium?isChecked();check();selectCheckbox();isSelected();30s
- Q14In 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
- Q15What 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