Olete.in
Articles
Mock Tests
🧪 Selenium MCQ Quiz Hub
Selenium Mcq Question Set 2
Choose a topic to test your knowledge and improve your Selenium skills
1. Select the command which is used to print a string value or a variable in Selenium IDE.
The 'display' command
The 'echo' command
The 'print' command
The 'printr' command
2. Which component of Selenium can create customized test results.
Web driver
Selenium RC
Selenium IDE
Selenium Grid
3. Select the command which is used to compare the contents of a table with expected values.
verifyTables
verifyTableData
verifyTable
verifyTableCell
4. Select the command which is used to pause execution until the specified element becomes present.
waitForElementPresent
waitForPagePresent
waitForTablePresent
waitForFieldPresent
5. Select the command that will NOT wait for a new page to load before moving onto the next command.
clickAndWait
selectAndType
typeAndWait
selectAndWait
6. Select the command which is used to pause execution until the page is loaded completely.
waitForPageToLoad
waitForElementPresent
waitForPage
waitForLoad
7. Select the syntax to locate an element using inner text.
css=tag:contains(inner text�)
css=tag:value(inner text�)
css=tag:attributes(inner text�)
css=tag:class(inner text�)
8. Select the command which is used to compare the actual page title with an expected value.
verifyTitle
verifiedTitle
verifyTitles
verifiedTitles
9. Select the command which is NOT used in verifying page elements .
verifyElementPresent
verifyElementRight
verifyElementNotPresent
verifyElementPositionLeft
10. Select the tab which gives feedback and other useful information when executing tests.
Information
Feedback
Reference
Element
11. What is TestNG?
TestNextGeneration
TestNewGenerlization
TestNewGeneration
TestNextGenerations
12. Select the variation which finds elements based on the driver's underlying CSS selector engine in Web driver Selenium.
By.cssSelected
By.cssSelection
By.cssSelector
By.Selectcs
13. Select the variation which locates elements by the value of the name attribute in Web driver Selenium
By.name
By.nametag
By.tagname
By.nametags
14. Select the tab that shows which command Selenium IDE is currently executing.
Variable
Data
Information
info
15. Which is a faster component between the SeleniumWeb driver and Selenium RC?
Selenium RC
Selenium Web driver
all of the above
None of the mentioned
16. Select the variation which locates elements by the value of their id attribute in Web Driver Selenium
By.id
By.idno
By.id_no
None of the mentioned
17. Select the Get command which fetches the inner text of the element that you specify in Web driver Selenium.
getinnerText()
get_in_Text()
get_inner_Text()
getText()
18. Which Navigate command takes you forward by one page on the browser's history in Web driver Selenium.
navigate.forward()
navigate().forward()
navigate()_forward()
navigate_forword()
19. Which method is used when you want to verify whether a certain check box, radio button, or option in a drop-down box is selected in Web driver Selenium
is_Selected()
isSelect()
isSelected()
is_Select()
20. Which Component is used to run multiple tests simultaneously in different browsers and platforms?
Selenium Grid
Selenium IDE
Selenium RC
Selenium Webdriver
21. Select the View which shows your script in HTML format.
The Table View
The Source View
The Editor View
The Field View
22. Select the method which clears all selected entries in Web driver Selenium.
dselectAll()
deselect_All()
dselect_All()
deselectAll()
23. Method which selects the option which displays the text matching the parameter passed to it
selectVisibleText()
selectByVisibleText()
select_VisibleText()
select_ByVisibleText()
24. Out of the following which is NOT a wait command.
waitForTitle
waitForTextPresent
waitForActive
waitForAlert
25. Select the command which retrieves the alert message and stores it in a variable that you will specify.
storeAlert
storedAlert
store_Alert
storesAlert
26. Select the method which performs a context-click at the current mouse location.
click_Context()
context.Click()
contextClick()
context_Click()
27. By Default time of WAITFOR command is :
15 sec
20 sec
25 sec
30 sec
28. Selenium is compatible with
CSS1.0 and CSS 2.0,
CSS1.0, CSS 2.0, and CSS 3.0 selectors.
CSS 2.0, and CSS 3.0 selectors.
CSS1.0, CSS 2.0, CSS 3.0 and CSS 4.0 selectors.
29. In Selenium variables are stored in _________ .
storedVars
storedVariables
VariablesStore
All of the above
30. Which command should be used to confirm that test will pass in the future, when new element is added after page loaded?
waitForElementPresent
pause
assertElementPresent
None of these
31. Which is the following is true in case of waitFor command?
waitForAlertPresent
waitForTextPresent
waitForFramePresent
waitForPageToLoad
32. How to execute specific command?
Highlight a command. Press Ctrl + F9.
Highlight a command. Press Alt + F9.
Highlight a command. Press Ctrl + X.
Highlight a command. Press X.
33. Which is odd one out?
ID
XPath
CSS selector
Pattern matching
34. _____ finds the item ending with the value passed in. This is the equivalent to the XPath ends-with. Is concern with?
^=
$=
*=
&=
35. In Selenium, Following Axis is related to:
Selects all the siblings after the current element
Selects all elements that follow the closing tab of the current elements.
Selects all of the siblings before the current element
Selects all elements that are before the current element
36. The // tells the query that
It needs to stop at the first element that it finds.
This is comment
The path of the file or folder
All of these
37. In regular Expression * quantifier refers to:
0 or more of the preceding character.
1 or more of the preceding character
0 or 1 of the preceding character
All of these
38. Which regular expression sequence that loosely translates to anything or nothing?
.* (dot star)
*. (star dot)
*?
*+
39. Which of the following is not verify and asserts method in Selenium?
VerifyElementPresent
VerifyElementNotPresent
VerifyText
VerifyTextAttributes
40. If you wanted to access the element that has the text This element has an ID that changes every time the page is loaded in it, then which of the following is used:
//div[contains(@id,'time_')]
//div[contains(@id_time())]
//div[parameter(@id_time())]
//div[parameter(@id,'time_')]
41. To delete a cookie we need to call the deleteCookie method, passing in two parameters.
The first parameter is the name of the cookie, and the second parameter is where it was created.
The first parameter is where it was created, and the second parameter is the name of cookie.
None of these
All of the above
42. Which two commands you use to validate a button?
VerifyTextPresent and assertTextPresent
VerifyElementPresent and assertElementPresent
VerifyAlertPresent and assertAlertPresent
VerifyAlert and assertAlert
43. In selenium, parent and child nodes are in same query because HTML has a tree structure.
True
False
all of the above
None of the mentioned
44. Selects all the parent, grandparent, and so on of the element is related to which axis name in Selenium:
Ancestor
Preceding
Parent
All of these.
45. echo(): is used
to display the value of a variable in the log file, which can be very valuable for debugging.
Display the value of a variable named answer in the log file, what would the first argument to the previous command look like.
Both of these
None of these
46. The term AJAX expands to ________.
Asynchronous Java and XML
Asynchronous JavaScript and XML
Accumulated Java and XML
none of the above
47. Which selenium command check whether specific text exists somewhere on the page?
verifyTextPresent
verifyTextPresent
CheckTextPresent
VerifyPresentText
48. What does the term CSS refer to?
Cascade Style Sheets
Cascading Style Sheets
Clear Style Sheets
Catering Style Sheets
49. What is Selenium IDE?
Windows Software
Firefox Plug-in
Java Software
Flash Plug-in
50. Where is XPath used in?
XML documents
MS-Word documents
MS-Excel documents
MS-PowerPoint documents
Submit