TCS iEvolve Course ID: 4869 || Wings 1 – Selenium Solutions || Fresco Play


Wings 1- Selenium Solutions

  1. Which of the following method is used to work with multiple browser windows?

  1. getMultipleWindows()
  2. getWiridowHandles()
  3. getWindowhandle()
  4. Both B&C

Answer: D

2. FM Which one is a class in Selenium?

  1. WebDriver Wait
  2. WebElement
  3. WebDriver
  4. getPageSource

Answer: A

3. Selenium method to get content which is inside any HTML tags?

  1. getText()
  2. getValue()
  3. get()
  4. getAttribute()

Answer: A

4. What is the best element locator in selenium webdriver?

  1. ID
  2. NAME
  3. XPATH
  4. CLASS

Answer: A

5. If you want to validate that a button has appeared on a page, which two commands would be the best two to use?

  1. verifyTextPresent/assertTextPresent
  2. verifyElementPresent/assertElement Present
  3. verifyAlertPresent/assertAlertPresent
  4. verifyAlert/assertAlert

Ans: B

6. If an element got added after the page has loaded what command would you use to make sure the test passed in the future?

  1. waitForElement Present
  2. pause
  3. assertElementPresent

Answer: A

7. What is the most common way to find an element on a page?

  1. Id
  2. Xpath
  3. CSS Selector
  4. Name

Answer: A

8. If you wanted to find the sibling input that is after an input in the DOM, what would the XPath look like?

Answer: //input/following-sibling::input

9. Pick two from the following if you wanted do a partial match on an attribute on an element from the beginning of the value?

  1. contains()
  2. starts-with()
  3. ends-with()
  4. A & B

Answer: D

10. What is the best call for finding multiple elements using XPath?

  1. findElementByXpath
  2. findElementsByXPath
  3. findElementByCssSelector
  4. Both B & C

Answer: B

11. Will a find Elements type call throw a No Such Element Exception when it can’t find the element?

Answer: No, it will not throw an exception. It will return an empty list.

12. Which of the following expression is used for “anything”?

  1. **
  2. .*
  3. *.
  4. *+

Answer: B

13. Select the odd one using in Selenium

  1. Pattern Matching
  2. XPath
  3. Id
  4. CSS selector

Answer: A

14. Which of the following is not a wait command in Selenium?

  1. waitForActive
  2. waitForAlert
  3. waitForTitle
  4. None of these

Answer: A

15. Selenium command for entering text into text boxes?

  1. sendKeys()
  2. sendKey()
  3. sendKey
  4. SendsKeys()

Answer: A

16. Which of the following language is not supported by Selenium

  1. PHP
  2. C#
  3. ASP
  4. Java

Answer: C


Spread the love

Leave a comment