Home

1000+ Selenium automation Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. Which two commands you use to validate a button?
A. VerifyTextPresent and assertTextPresent
B. VerifyElementPresent and assertElementPresent
C. VerifyAlertPresent and assertAlertPresent
D. VerifyAlert and assertAlert
Answer : B
2. Selenium variables are stored in _____________.
A. storedVars
B. storedVariables
C. VariablesStore
D. None of the above
Answer : A
3. Select the command in Selenium IDE used to open a page using the URL.
A. OpenRecord
B. Open
C. OpenText
D. OpenTable
Answer : B
4. Select the command which is NOT a type of assertion in Selenium IDE.
A. Assert
B. Verify
C. WaitFor
D. Wait
Answer : D
5. 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:
A. //div[contains(@id,'time_')]
B. //div[contains(@id_time())]
C. //div[parameter(@id_time())]
D. //div[parameter(@id,'time_')]
Answer : A
6. Select the command which is used to check the presence of a certain element.
A. verifyTable
B. verifyTitlePresent
C. verifyTextPresent
D. verifyElementPresent
Answer : D
7. Select the command which is used to pause execution until the page is loaded completely.
A. waitForPageToLoad
B. waitForElementPresent
C. waitForPage
D. waitForLoad
Answer : A
8. In selenium, parent and child nodes are in same query because HTML has a tree structure.
A. True
B. False
C.
D.
Answer : A
9. Select the component which is NOT part of Selenium suite.
A. Selenium IDE
B. Selenium RC
C. SeleniumGrid
D. Selenium Web
Answer : D
10. Select the command which is used to compare the actual page title with an expected value.
A. verifyTitle
B. verifiedTitle
C. verifyTitles
D. verifiedTitles
Answer : A
11. What is a test suite made of ?
A. Test packs
B. Tests
C. Test blocks
D. Test pattern
Answer : B
12. Selenium is compatible with
A. CSS1.0 and CSS 2.0,
B. CSS1.0, CSS 2.0, and CSS 3.0 selectors.
C. CSS 2.0, and CSS 3.0 selectors.
D. CSS1.0, CSS 2.0, CSS 3.0 and CSS 4.0 selectors.
Answer : B
13. Which regular expression sequence that loosely translates to anything or nothing?
A. .* (dot star)
B. *. (star dot)
C. *?
D. *+
Answer : A
14. In regular Expression * quantifier refers to:
A. 0 or more of the preceding character.
B. 1 or more of the preceding character
C. 0 or 1 of the preceding character
D. All of these
Answer : A
15. Out of the following which is NOT a wait command.
A. waitForTitle
B. waitForTextPresent
C. waitForActive
D. waitForAlert
Answer : C
16. Which is odd one out?
A. ID
B. XPath
C. CSS selector
D. Pattern matching
Answer : D
17. Which component of Selenium can create customized test results.
A. Web driver
B. Selenium RC
C. Selenium IDE
D. Selenium Grid
Answer : A
18. Select the command which is NOT used in verifying page elements .
A. verifyElementPresent
B. verifyElementRight
C. verifyElementNotPresent
D. verifyElementPositionLeft
Answer : B
19. What is TestNG?
A. TestNextGeneration
B. TestNewGenerlization
C. TestNewGeneration
D. TestNextGenerations
Answer : A
20. Which Component is used to run multiple tests simultaneously in different browsers and platforms?
A. Selenium Grid
B. Selenium IDE
C. Selenium RC
D. Selenium Webdriver
Answer : A
21. We use the dot (.) operator followed by either a * or a +. The + tells the regular expression that there will be instances between 0 and n, while the * tells the regular expression that there will be instances between 1 and n.
A. True
B. False
C.
D.
Answer : B
22. Variable can be saved in which format?
A. ${variableName}
B. storedVars['variableName'].
C. Both of these
D. None of these
Answer : C
23. Select the command which retrieves the alert message and stores it in a variable that you will specify.
A. storeAlert
B. storedAlert
C. store_Alert
D. storesAlert
Answer : A
24. 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
A. is_Selected()
B. isSelect()
C. isSelected()
D. is_Select()
Answer : C
25. Which of the following is not verify and asserts method in Selenium?
A. VerifyElementPresent
B. VerifyElementNotPresent
C. VerifyText
D. VerifyTextAttributes
Answer : D
26. What is the default port number used by hub in selenium?
A. 4444
B. 2222
C. 1111
D. 3333
Answer : A
27. The Selenium
A. Provides professional customer support
B. Test Reports are generated automatically
C. Comes with a built-in object repository
D. Cannot access elements outside of the web application under test
Answer : D
28. What is Selenium IDE ?
A. Windows Software
B. Firefox Plug-in
C. Java Software
D. Flash Plug-in
Answer : B
29. Selenium IDE stands for
A. Selenium Intialization Development Environment
B. Selenium Interrelated Development Environment
C. Selenium Integrated Development Environment
D. Selenium Information Development Environment
Answer : C
30. What does the term regex expands to ?
A. Registered Expression
B. Regular Expression
C. Regression Expression
D. Regional Expression
Answer : B
31. By Default time of WAITFOR command is :
A. 15 sec
B. 20 sec
C. 25 sec
D. 30 sec
Answer : D
32. Select the command that will NOT wait for a new page to load before moving onto the next command.
A. clickAndWait
B. selectAndType
C. typeAndWait
D. selectAndWait
Answer : B
33. Which is not true in case of Globs, in Selenium?
A. Globs are used as default pattern matching technique.
B. It is similar to regular expressions.
C. The syntax of Globs is much wider than Regular expression
D. B and C
Answer : C
34. Can Google chrome be supported by Selenium IDE?
A. Yes
B. No
C.
D.
Answer : B
35. Which is a procedure?
A. Wait
B. Exit
C. WaitForProperty
D. None of these.
Answer : A
36. Select the language which is supported by The Selenium Web Driver
A. Perl
B. Sql
C. ASP
D. Cobol
Answer : A
37. Which selenium command check whether specific text exists somewhere on the page ?
A. verifyTextPresent
B. verifyTextPresent
C. CheckTextPresent
D. VerifyPresentText
Answer : A
38. How to execute specific command?
A. Highlight a command. Press Ctrl + F9.
B. Highlight a command. Press Alt + F9.
C. Highlight a command. Press Ctrl + X.
D. Highlight a command. Press X.
Answer : D
39. Select the Browser which is supported by Selenium IDE
A. Google chrome
B. Opera mini
C. Mozilla Firefox
D. Internet Explorer
Answer : C
40. Which Navigate command takes you forward by one page on the browser's history in Web driver Selenium.
A. navigate.forward()
B. navigate().forward()
C. navigate()_forward()
D. navigate_forword()
Answer : B
41. In case of Selenium IDE, the Source view shows your script in
A. DHTML format
B. J2EE format
C. XML format
D. HTML format.
Answer : C
42. Which command can be used to enter values onto text boxes?
A. sendsKeys()
B. sendKey()
C. sendKeys
D. sendKeys()
Answer : D
43. Select the command which is used to compare the contents of a table with expected values.
A. verifyTables
B. verifyTableData
C. verifyTable
D. verifyTableCell
Answer : C
44. Select the View which shows your script in HTML format.
A. The Table View
B. The Source View
C. The Editor View
D. The Field View
Answer : B
45. Select the method which clears all selected entries in Web driver Selenium.
A. dselectAll()
B. deselect_All()
C. dselect_All()
D. deselectAll()
Answer : D
46. Variable can be saved in which format?
A. ${variableName}
B. storedVars['variableName'].
C. Both of these
D. None of these
Answer : C
47. The test language usually used in Selenium is ________________.
A. PHP
B. Python
C. JavaScript
D. None of the above
Answer : C
48. Which process use the JavaScript to find an element?
A. By DOM query
B. BY XPath query
C. BY CSS sector
D. All of these
Answer : A
49. Select the tab that shows which command Selenium IDE is currently executing.
A. Variable
B. Data
C. Information
D. Info
Answer : D
50. Select the syntax to locate an element using inner text.
A. css=tag:contains(inner text�)
B. css=tag:value(inner text�)
C. css=tag:attributes(inner text�)
D. css=tag:class(inner text�)
Answer : A

Sharing is caring