Home

Selenium automation 1000+ MCQ with answer for CLAT PG

Thursday 9th of March 2023

Sharing is caring

1. The test language usually used in Selenium is ________________.
A. PHP
B. Python
C. JavaScript
D. None of the above
Answer : C
2. Selenium tests _____________.
A. DOS applications
B. Browser-based applications
C. GUI applications
D. None of the above
Answer : B
3. What is called that scale for large test suites or test suites that must be run in multiple environments?
A. Selenium-Grid
B. Selenium RC
C. Selenium Web driver
D. Selenium NG
Answer : A
4. 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
5. 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
6. Which is a faster component between the SeleniumWeb driver and Selenium RC?
A. Selenium RC
B. Selenium Web driver
C.
D.
Answer : B
7. 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
8. What does the assertTitle checks ?
A. Element title
B. Page title
C. Block title
D. Title of element under focus
Answer : B
9. Can Google chrome be supported by Selenium IDE?
A. Yes
B. No
C.
D.
Answer : B
10. Can Unix operating system be supported by Selenium IDE?
A. No
B. Yes
C.
D.
Answer : A
11. 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
12. Which is the following is true in case of waitFor command?
A. waitForAlertPresent
B. waitForTextPresent
C. waitForFramePresent
D. waitForPageToLoad
Answer : B
13. 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
14. Which selenium command check whether specific text exists somewhere on the page ?
A. verifyTextPresent
B. verifyTextPresent
C. CheckTextPresent
D. VerifyPresentText
Answer : A
15. What does the term CSS refers to ?
A. Cascade Style Sheets
B. Cascading Style Sheets
C. Clear Style Sheets
D. Catering Style Sheets
Answer : B
16. In selenium, parent and child nodes are in same query because HTML has a tree structure.
A. True
B. False
C.
D.
Answer : A
17. The Actions commands
A. are commands that directly interact with page elements.
B. are commands that allow you to store values to a variable.
C. are commands that verify if a certain condition is met.
D.
Answer : A
18. 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
19. Which command can be used to enter values onto text boxes?
A. sendsKeys()
B. sendKey()
C. sendKeys
D. sendKeys()
Answer : D
20. 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
21. Selects all the parent, grandparent, and so on of the element is related to which axis name in Selenium:
A. Ancestor
B. Preceding
C. Parent
D. All of these.
Answer : A
22. 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
23. Where is XPath used in ?
A. XML documents
B. MS-Word documents
C. MS-Excel documents
D. MS-PowerPoint documents
Answer : A
24. By Default time of WAITFOR command is :
A. 15 sec
B. 20 sec
C. 25 sec
D. 30 sec
Answer : D
25. Select the command in Selenium IDE used to open a page using the URL.
A. OpenRecord
B. Open
C. OpenText
D. OpenTable
Answer : B
26. 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
27. What is Selenium IDE ?
A. Windows Software
B. Firefox Plug-in
C. Java Software
D. Flash Plug-in
Answer : B
28. 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
29. 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
30. In Selenium variables are stored in _________ .
A. storedVars
B. storedVariables
C. VariablesStore
D. All of the above
Answer : A
31. What is the most common way to find an element on a page?
A. ID
B. XPath
C. CSS selector
D. Name
Answer : B
32. 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
33. Select the tab that shows which command Selenium IDE is currently executing.
A. Variable
B. Data
C. Information
D. Info
Answer : D
34. 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
35. Out of the following which can only test web applications
A. QTP
B. Selenium
C.
D.
Answer : B
36. Variable can be saved in which format?
A. ${variableName}
B. storedVars['variableName'].
C. Both of these
D. None of these
Answer : C
37. The term JSON refers to ______________.
A. JavaScript Object Notation
B. Java Object Notation
C. Java Object Naming
D. None of the above
Answer : A
38. 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
39. Select the command which is used to check the presence of a certain element.
A. verifyTable
B. verifyTitlePresent
C. verifyTextPresent
D. verifyElementPresent
Answer : D
40. To delete a cookie we need to call the deleteCookie method, passing in two parameters.
A. The first parameter is the name of the cookie, and the second parameter is where it was created.
B. The first parameter is where it was created, and the second parameter is the name of cookie.
C. None of these
D. All of the above
Answer : A
41. Select the language which is NOT supported by the Selenium RC.
A. ASP
B. Java
C. C#
D. PHP
Answer : A
42. What does the term regex expands to ?
A. Registered Expression
B. Regular Expression
C. Regression Expression
D. Regional Expression
Answer : B
43. 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
44. Select the tab which gives feedback and other useful information when executing tests.
A. Information
B. Feedback
C. Reference
D. Element
Answer : C
45. 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
46. Variable can be saved in which format?
A. ${variableName}
B. storedVars['variableName'].
C. Both of these
D. None of these
Answer : C
47. 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
48. The Selenium can
A. access controls within the desktop
B. both web and desktop applications
C. only test web applications
D.
Answer : C
49. Which regular expression sequence that loosely translates to anything or nothing?
A. .* (dot star)
B. *. (star dot)
C. *?
D. *+
Answer : A
50. Select the variation which locates elements by the value of the name� attribute in Web driver Selenium
A. By.name
B. By.nametag
C. By.tagname
D. By.nametags
Answer : A

Sharing is caring