Home

Selenium automation 1000+ MCQ with answer for UPSC CDS

Thursday 9th of March 2023

Sharing is caring

1. What is Selenium IDE ?
A. Windows Software
B. Firefox Plug-in
C. Java Software
D. Flash Plug-in
Answer : B
2. In selenium, parent and child nodes are in same query because HTML has a tree structure.
A. True
B. False
C.
D.
Answer : A
3. echo(): is used
A. to display the value of a variable in the log file, which can be very valuable for debugging.
B. Display the value of a variable named answer in the log file, what would the first argument to the previous command look like.
C. Both of these
D. None of these
Answer : C
4. Selenium variables are stored in _____________.
A. storedVars
B. storedVariables
C. VariablesStore
D. None of the above
Answer : A
5. 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
6. What does the term regex expands to ?
A. Registered Expression
B. Regular Expression
C. Regression Expression
D. Regional Expression
Answer : B
7. 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
8. Which is odd one out?
A. ID
B. XPath
C. CSS selector
D. Pattern matching
Answer : D
9. Which command can be used to enter values onto text boxes?
A. sendsKeys()
B. sendKey()
C. sendKeys
D. sendKeys()
Answer : D
10. What does the term DOM refers to ?
A. Dynamic Object Model
B. Document Object Model
C. Data Object Model
D. Document Flow Object Model
Answer : B
11. In Selenium, Following Axis is related to:
A. Selects all the siblings after the current element
B. Selects all elements that follow the closing tab of the current elements.
C. Selects all of the siblings before the current element
D. Selects all elements that are before the current element
Answer : B
12. Which is a faster component between the SeleniumWeb driver and Selenium RC?
A. Selenium RC
B. Selenium Web driver
C.
D.
Answer : B
13. 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
14. 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
15. 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
16. 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
17. 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
18. Select the command which is NOT a type of assertion in Selenium IDE.
A. Assert
B. Verify
C. WaitFor
D. Wait
Answer : D
19. The // tells the query that
A. It needs to stop at the first element that it finds.
B. This is comment
C. The path of the file or folder
D. All of these
Answer : A
20. 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
21. Which regular expression sequence that loosely translates to anything or nothing?
A. .* (dot star)
B. *. (star dot)
C. *?
D. *+
Answer : A
22. 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
23. Which is a procedure?
A. Wait
B. Exit
C. WaitForProperty
D. None of these.
Answer : A
24. In Selenium variables are stored in _________ .
A. storedVars
B. storedVariables
C. VariablesStore
D. All of the above
Answer : A
25. 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
26. What is the default port number used by hub in selenium?
A. 4444
B. 2222
C. 1111
D. 3333
Answer : A
27. Which is the following is true in case of waitFor command?
A. waitForAlertPresent
B. waitForTextPresent
C. waitForFramePresent
D. waitForPageToLoad
Answer : B
28. Select the tab which gives feedback and other useful information when executing tests.
A. Information
B. Feedback
C. Reference
D. Element
Answer : C
29. Which command is used to extend the time limit of WAITFOR command?
A. Extend waitFor (time in sec)
B. waitFor (time in sec) extend
C. setTimeout (time in sec)
D. setTimeout.
Answer : D
30. Select the language which is supported by The Selenium Web Driver
A. Perl
B. Sql
C. ASP
D. Cobol
Answer : A
31. Which of the following is not verify and asserts method in Selenium?
A. VerifyElementPresent
B. VerifyElementNotPresent
C. VerifyText
D. VerifyTextAttributes
Answer : D
32. Select the variation which locates elements by the value of their id� attribute in Web Driver Selenium
A. By.id
B. By.idno
C. By.id_no
D. By.tag_id
Answer : A
33. The test language usually used in Selenium is ________________.
A. PHP
B. Python
C. JavaScript
D. None of the above
Answer : C
34. Select the Get command which fetches the inner text of the element that you specify in Web driver Selenium.
A. getinnerText()
B. get_in_Text()
C. get_inner_Text()
D. getText()
Answer : D
35. 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
36. 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
37. Out of the following which can only test web applications
A. QTP
B. Selenium
C.
D.
Answer : B
38. Which component of Selenium can create customized test results.
A. Web driver
B. Selenium RC
C. Selenium IDE
D. Selenium Grid
Answer : A
39. Selenium tests _____________.
A. DOS applications
B. Browser-based applications
C. GUI applications
D. None of the above
Answer : B
40. Which Selenium component supports All Operating System?
A. Selenium Generator
B. Selenium IDE
C. Selenium WebDriver
D.
Answer : C
41. Select the tab that shows which command Selenium IDE is currently executing.
A. Variable
B. Data
C. Information
D. Info
Answer : D
42. ___________ finds the item ending with the value passed in. This is the equivalent to the XPath ends-with. Is concern with?
A. ^=
B. $=
C. *=
D. &=
Answer : B
43. Where is XPath used in ?
A. XML documents
B. MS-Word documents
C. MS-Excel documents
D. MS-PowerPoint documents
Answer : A
44. What is the most common way to find an element on a page?
A. ID
B. XPath
C. CSS selector
D. Name
Answer : B
45. 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
46. 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
47. By Default time of WAITFOR command is :
A. 15 sec
B. 20 sec
C. 25 sec
D. 30 sec
Answer : D
48. Select the component which is NOT part of Selenium suite.
A. Selenium IDE
B. Selenium RC
C. SeleniumGrid
D. Selenium Web
Answer : D
49. 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
50. Select the operating system which is NOT supported by Selenium IDE.
A. Unix
B. Linux
C. Windows
D. Solaris
Answer : A

Sharing is caring