
Question 1
Answer
Question 1
Which of the below is true?
a) In the case of assertion, if the assert condition is not met, test case execution will be aborted.
b) In the case of verify, tests will continue to run untill the last test is executed even if assert conditions are not met.
A) Both a and b are false
B) only b is true
C) Both a and b are true
D) Only a is true
Answer
Question 2
Answer
Question 2
Select the method, which selects the option at the given index.
A) selectindex()
B) selectByindex()
C) selectByIndexes()
D) selectdByindex()
Answer
Question 3
Answer
Question 3
Is it possible to verify color in tests using Selenium?
A) Yes, using getColorValue(“rgb”), though “rgb” is the only supported color model.
B) No, it’s not possible to do it.
C) Yes, using the getCssValue() method.
D) Yes, using getColorValue(“rgb”), where “rgb” can be replaced by any color model.
Answer
Question 4
Answer
Question 4
Which of the following waiter can check the existence of element on the frequency defined by the user.
A) waitForPageToLoad()
B) Fluent wait
C) Thread.Sleep()
D) Implicit wait
Answer
<html>
<body>
<div>
<p>User profile are below</p>
</div>
<div>
<h1 value=""Name"">profile:</h1>
<p>John</p>
</div>
</body>
</html>
Question 5
Answer
Question 5
Which of the following gets the text ‘John’ from above HTML?
A) driver.findElement(By.xpath(“//h1[@value=’Name’]/following-sibling::p’]”)).getText();
B) driver.findElement(By.xpath(“//h1[@value=’Name’]/p’]”)).getText();
C) driver.findElement(By.xpath(“//p[1]”)).getText();
D) driver.findElement(By.xpath(“//p[@text=’John’]”)).getText();
Answer
<html>
<body>
<table>
<tr style=""vertical-align:top"">
<td>
<div id=""divId_1"">
<input type=""text"" class=""class2 class3 bindname=""names"" id=""inpId_2"" style=""width"600px;"" value=""Test Data"">
</div>
</td>
</tr>
</table>
</html>
Question 6
Answer
Question 6
Which of the below Xpath DOES NOT find the textbox with the ‘Test Data’ in above HTNL?
A) //div[@id=’divId_2′]/input
B) //input[contains{@class, ‘class3’}]
C) //input[@bindname=’names’]
D) //input[type=text][id=inpId_2]
Answer
Question 7
Answer
Question 7
For the below situation,
-Implicit wait is set to 10 sec
-Explicit wait for the WebElement ‘element’ is set for 15 sec.
-WebElement ‘element’ appered at 13th sec
A) the program will find the ‘element’ and continue with execution.
B) the program will not find the ‘element’ and throws NoSuchElement exception.
C) the program will wait for 15 sec and continue with the execution.
D) the program will find the ‘element’ and throws NoSuchElement exception.
Answer
Question 8
Answer
Question 8
Which of the following can be tested automatically using Selenium?
A) Mobile applications
B) CAPTCHA
C) iframes
D) Desktop applications
Answer
Question 9
Answer
Question 9
Which of the following is not a member of selenium suite of tools
A) Selenium RC
B) Selenium IDE
C) Selenium Grid
D) Selenium Web
Answer
Question 10
Answer
Question 10
Selenium can
A) find elements from desktop applications
B) find defects in API specifications
C) generates test reports automatically
D) perform operations on element inside an iframe
Answer