Home

Selenium automation 1000+ MCQ with answer for GATE

Thursday 9th of March 2023

Sharing is caring

1. The term AJAX expands to ________.
A. Asynchronous Java and XML
B. Asynchronous JavaScript and XML
C. Accumulated Java and XML
D. None of the above
Answer : B
2. Select the Browser which is supported by Selenium IDE
A. Google chrome
B. Opera mini
C. Mozilla Firefox
D. Internet Explorer
Answer : C
3. Select the language which is supported by The Selenium Web Driver
A. Perl
B. Sql
C. ASP
D. Cobol
Answer : A
4. The term JSON refers to ______________.
A. JavaScript Object Notation
B. Java Object Notation
C. Java Object Naming
D. None of the above
Answer : A
5. Select the tab which gives feedback and other useful information when executing tests.
A. Information
B. Feedback
C. Reference
D. Element
Answer : C
6. In selenium, parent and child nodes are in same query because HTML has a tree structure.
A. True
B. False
C.
D.
Answer : A
7. 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
8. Which is a faster component between the SeleniumWeb driver and Selenium RC?
A. Selenium RC
B. Selenium Web driver
C.
D.
Answer : B
9. 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
10. Select the method which performs a context-click at the current mouse location.
A. click_Context()
B. context.Click()
C. contextClick()
D. context_Click()
Answer : C
11. Applications do not have the items needed for the tests when the tests get to commands. To get around this, we had a look at adding fro waitFor commands to test. This is related to
A. Debugging tests
B. Working with AJAX applications
C. Working with multiple windows
D. All of these
Answer : B
12. What is TestNG?
A. TestNextGeneration
B. TestNewGenerlization
C. TestNewGeneration
D. TestNextGenerations
Answer : A
13. 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
14. 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
15. Which Selenium component supports All Operating System?
A. Selenium Generator
B. Selenium IDE
C. Selenium WebDriver
D.
Answer : C
16. What does the assertTitle checks ?
A. Element title
B. Page title
C. Block title
D. Title of element under focus
Answer : B
17. Selenium tests _____________.
A. DOS applications
B. Browser-based applications
C. GUI applications
D. None of the above
Answer : B
18. Select the operating system which is NOT supported by Selenium IDE.
A. Unix
B. Linux
C. Windows
D. Solaris
Answer : A
19. What is the most common way to find an element on a page?
A. ID
B. XPath
C. CSS selector
D. Name
Answer : B
20. 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
21. ___________ 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
22. Select the tab that shows which command Selenium IDE is currently executing.
A. Variable
B. Data
C. Information
D. Info
Answer : D
23. What is a test suite made of ?
A. Test packs
B. Tests
C. Test blocks
D. Test pattern
Answer : B
24. Which command can be used to enter values onto text boxes?
A. sendsKeys()
B. sendKey()
C. sendKeys
D. sendKeys()
Answer : D
25. The Selenium IDE is used
A. To create customized test results.
B. To deploy your tests across multiple environments using Selenium Grid
C. To test with HTMLUnit
D. To test a web application against Firefox only.
Answer : D
26. 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
27. The Selenium can
A. access controls within the desktop
B. both web and desktop applications
C. only test web applications
D.
Answer : C
28. The Selenium RC is used
A. To run your test against different browsers (except HtmlUnit) on different operating systems.
B. To create tests with little or no prior knowledge in programming.
C. To test a web application against Firefox only.
D. To run a huge test suite, that can be executed on multiple machines.
Answer : A
29. 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
30. Select the command which is used to pause execution until the specified element becomes present.
A. waitForElementPresent
B. waitForPagePresent
C. waitForTablePresent
D. waitForFieldPresent
Answer : A
31. Select the variation which finds elements based on the driver's underlying CSS selector engine in Web driver Selenium.
A. By.cssSelected
B. By.cssSelection
C. By.cssSelector
D. By.Selectcs
Answer : C
32. Select the command which is NOT used in verifying page elements .
A. verifyElementPresent
B. verifyElementRight
C. verifyElementNotPresent
D. verifyElementPositionLeft
Answer : B
33. 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
34. Select the command in Selenium IDE used to open a page using the URL.
A. OpenRecord
B. Open
C. OpenText
D. OpenTable
Answer : B
35. 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
36. 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
37. Selenium variables are stored in _____________.
A. storedVars
B. storedVariables
C. VariablesStore
D. None of the above
Answer : A
38. Can Google chrome be supported by Selenium IDE?
A. Yes
B. No
C.
D.
Answer : B
39. 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
40. 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
41. Out of the following which is NOT a wait command.
A. waitForTitle
B. waitForTextPresent
C. waitForActive
D. waitForAlert
Answer : C
42. Which component of Selenium can create customized test results.
A. Web driver
B. Selenium RC
C. Selenium IDE
D. Selenium Grid
Answer : A
43. Can Unix operating system be supported by Selenium IDE?
A. No
B. Yes
C.
D.
Answer : A
44. Which command should be used to confirm that test will pass in the future, when new element is added after page loaded?
A. waitForElementPresent
B. pause
C. assertElementPresent
D. None of these
Answer : A
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. Select the command which is NOT a type of assertion in Selenium IDE.
A. Assert
B. Verify
C. WaitFor
D. Wait
Answer : D
47. What does the term regex expands to ?
A. Registered Expression
B. Regular Expression
C. Regression Expression
D. Regional Expression
Answer : B
48. 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
49. Which of the following is not verify and asserts method in Selenium?
A. VerifyElementPresent
B. VerifyElementNotPresent
C. VerifyText
D. VerifyTextAttributes
Answer : D
50. 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

Sharing is caring