MCQ Selenium Test 2


1. In Alert Interface which method is not available?
A. getText()
B. accept()
C. getTitle()
D. sendKeys(CharSequence sequence)



2. Selenium script can only be written in Java programming Language. True or false?
A. True
B. False



3. Which method is used to select an item from dropdown in Select class?
A. selectByIndex
B. selectByValue
C. selectByVisibleText
D. All the Above



4. List and Set Interface is present in which package?
A. java.lang
B. java.io
C. java.util
D. java.net



5. switchTo command is used to switch to?
A. Alert
B. Frame
C. Window
D. All the Above



6. What is return type findElement method?
A. Object
B. String
C. WebElement
D. WebDriver



7. What is return type findElements method?
A. List<Object>
B. List<WebElement>
C. List<String>
D. Set<WebElement>



8. What is return type getWindowHandle method?
A. String
B. StringBuffer
C. StringBuilder
D. WebElement



9. What is return type getWindowHandles method?
A. List<WebElement>
B. Set<StringBuilder>
C. Set<String>
D. Set<StringBuffer>



10. Which Interface is used to execute JavaScript in Selenium WebDriver Script?
A. WebDriver
B. JavascriptExecutor
C. RemoteDriver
D. WebElement


3 comments: