Pages

Saturday, 5 September 2015

Selenium Page9 Multiple Choice Questions And Answers

81. 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
Ans: B

82. 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
Ans: B

83. What is the most common way to find an element on a page?
A. ID
B. XPath
C. CSS selector
D. Name
Ans:

84. 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
Ans: C

85. 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
Ans: A

86. Which of the following is not verify and asserts method in Selenium?
A. VerifyElementPresent
B. VerifyElementNotPresent
C. VerifyText
D. VerifyTextAttributes
Ans: D

87. 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_’)]
Ans: A

88. 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
Ans: A

89. What is the default port number used by hub in selenium?
A. 4444
B. 2222
C. 1111
D. 3333
Ans: A

90. 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
Ans: B

91. In selenium, parent and child nodes are in same query because HTML has a tree structure.
A. True
B. False
Ans: A

92. 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.
Ans: A

93. Variable can be saved in which format?
A. ${variableName}
B. storedVars['variableName'].
C. Both of these
D. None of these
Ans: C

94. 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
Ans: C


More Questions & Answers:-
Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9

No comments:

Post a Comment