Selenium WebDriver MCQs Solution | TCS Fresco Play

0

Selenium WebDriver MCQs Solution | TCS Fresco Play

Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the MCQs Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!

Course Path: DevOps/TESTING/Selenium WebDriver


on WebDriver

1.Which component of selenium support web broswers across OS ?

  1. Selenium IDE
  2. Selenium WebDriver
  3. All the options
  4. Selenium Generator

Answer: 2)Selenium WebDriver

2.Which version on Friefox Browser need GeckoDriver ?

  1. Firefox version 50+
  2. Firefox version 45+
  3. Firefox version 47+
  4. Firefox version 40+

Answer: 3)Firefox version 47+

3.Which of the following language is used in selenium as a test language ?

  1. Java
  2. javascript
  3. All of these
  4. PHP

Answer: 3)All of these

4.Which languages is Supported in Selenium ?

  1. All of these
  2. Python
  3. Java
  4. Ruby

Answer: 1)All of these

5.Out the following which can test only the web application ?

  1. ALM
  2. All of these
  3. Selenium
  4. QTP

Answer: 3)Selenium

6.What does Ajax refers

  1. Accmulated Java and XML
  2. Asynchronous Javascript and XML
  3. Asynchronous Java and XML
  4. None of these

Answer: 2)Asynchronous Javascript and XML

7.Selenium is Open-Source

  1. True
  2. False

Answer: 1)True

8.What kind of application is Selenium IDE ?

  1. Desktop application
  2. None of these
  3. Firefox add-on
  4. Web application

Answer: 3)Firefox add-on

9.Selenium IDE supports in ?

  1. All the options
  2. Chrome
  3. Firefox
  4. Internet Explorer

Answer: 3)Firefox

10.What does the term JSON expands on ?

  1. None of these
  2. Java object notation
  3. Javascript object notation
  4. Java object naming

Answer: 3)Javascript object notation

11.Which Selenium components helps with Perfomance testing ?

  1. Selenium WebDriver
  2. Selenium IDE
  3. Selenium Grid
  4. Selenium RC

Answer: 3)Selenium Grid

12.Between Selenium RC & Webdriver component Which is faster ?

  1. Selenium RC
  2. Selenium IDE
  3. Selenium WebDriver
  4. Selenium Grid

Answer: 3)Selenium WebDriver

13.On what OS does Selenium works ?

  1. All the options
  2. Linux
  3. Windows
  4. Mac

Answer: 1)All the options

14.Selenium 3.0 introduced in which year ?

  1. 2004
  2. 2016
  3. 2008
  4. 2006

Answer: 2)2016


Quiz on Maven

1.Apache POI help to read Excel File ?

  1. True
  2. False

Answer: 1)True

2.Maven POM refers - Page Object Model

  1. True
  2. False

Answer: 2)False

3.Insteaded of running a full build package we can run with help of

  1. mvn clean install
  2. maven run
  3. maven clean install
  4. mvn run

Answer: 1)mvn clean install

4.Can we Integrate TestNG and Jenkins with Maven ?

  1. True
  2. False

Answer: 1)True

5.Which of the following command is use to check Maven version ?

  1. mvn --version
  2. mvn version
  3. Maven - -version
  4. maven -version

Answer: 1)mvn --version

6.Maven POM refers - Project Object Model

  1. True
  2. False

Answer: 1)True


Quiz on TestNG

1.TestNG works with Annotations and annotation can be represented with symbol

  1. #
  2. @
  3. $
  4. *

Answer: 2)@

2.What are the Annotations available In Testng?

  1. @AfterSCript
  2. @BeforeScript
  3. @Test
  4. @Script

Answer: 3)@Test

3.In TestNG “NG” Stands for Next Generation

  1. False
  2. True

Answer: 2)True

[email protected](description = “test method”) It is a description for a method ?

  1. True
  2. False

Answer: 1)True

5.JUnit and Nunit does has lots more functionality than TestNG ?

  1. True
  2. False

Answer: 2)False


Selenium Commands/Interaction

1.Which of the following clears all selected entries in Selenium Webdriver?

  1. deselect.All()
  2. deselectAll()
  3. dselectAll()
  4. dselect.All()

Answer: 2)deselectAll()

2.Implicit wait time is applied to all elements in your code while Explicit waits are applied only to a single element for a specified amount of time.

  1. True
  2. False

Answer: 1)True

3.Which command takes you forward by one page on the browser’s history?

  1. Navigate().forward()
  2. Navigate.forward()
  3. navigate.forward()
  4. Navigate.forward
  5. navigate.forward

Answer: 1)Navigate().forward()

4.Which is not a WebElement Method?

  1. getText()
  2. sendKeys()
  3. getTagName()
  4. size()

Answer: 4)size()

5.What are the utility of the action commands?

  1. are commands that directly interact with page elements.
  2. are command that verify if a certain condition is met
  3. are commands that allow you to store values to a variable
  4. All of the options

Answer: 1)are commands that directly interact with page elements.

6.WebDriverWait wait = new WebDriverWait(driver, 30);XXXXwait.until(ExpectedConditions.presenceOfElementLocated(by));XXXXThe above wait condition is considered an:

  1. Implicit wait
  2. None of these
  3. Explicit wait

Answer: 3)Explicit wait

7.Which of the following method performs a context-click at the mouse location?

  1. Click_Context
  2. context.Click()
  3. contextClick()
  4. context_Click()

Answer: 3)contextClick()

8.It is a valid Selenium Command “driver.navigate().refresh ();”?

  1. True
  2. False

Answer: 1)True

9.What is the unit of movements String argument in Drag and Drop Selenium action?

  1. pixel
  2. inches
  3. cm
  4. Percentage

Answer: 1)pixel

10.In webdriver ” selectAllOptions() “ is a valid command.

  1. False
  2. True

Answer: 1)False


Quiz on Design Techniques

1.Data Driven Testing methodology in automated testing to test only a single set of Test Data.

  1. True
  2. False

Answer: 2)False

2.Can we use Headless Browser in CrossBrowser Testing

  1. True
  2. False

Answer: 1)True

3.In POM both “@FindBy” & “how” annotations can be used in same class file

  1. True
  2. False

Answer: 1)True

4.Do screenshot method created with help of driver object ?

  1. False
  2. True

Answer: 2)True

5.These annotations are part of page factory method (“@FindBy” & “how”)

  1. False
  2. True

Answer: 2)True

6.In webdriver, what is the return value of sendKeys function

  1. bool
  2. string
  3. char
  4. None of these

Answer: 2)string

7.What are the types of Page Object Model

  1. Normal POM Approach
  2. Page Factory Method
  3. Both the options
  4. None of these

Answer: 3)Both the options

8.Data Driven Testing requires Apache Poi Dependency ?

  1. True
  2. False

Answer: 1)True

9.In CrossBrowser to run prallel Tesing we need triger “.java” file

  1. True
  2. False

Answer: 2)False

10.Page Object Model mainly consists of

  1. Pages folder
  2. utility folder
  3. All the options
  4. Tests folder

Answer: 3)All the options


Final Assessment

1.Which of these finds the element based on the CSS Selector engine with webdriver ?

  1. By.cssSelection
  2. By.cssSelector
  3. By.cssSelect
  4. By.cssSelected

Answer: 2)By.cssSelector

2.What are the navigation methods listed below.

  1. all the above
  2. back()
  3. forward()
  4. to()

Answer: 1)all the above

3.What is the difference between “/” and “//” in Xpath?

  1. “/” is used to create XPath with a relative path and “//” is used to create XPath with an absolute path
  2. “/” is used to create XPath with an absolute path and “//” is used to create XPath with a relative path

Answer: 2)“/” is used to create XPath with an absolute path and “//” is used to create XPath with a relative path

4.What document type uses Xpath

  1. MS-Powerpoint documents
  2. MS-Word documents
  3. MS-Excel documents
  4. XML documents

Answer: 4)XML documents

5.What is the unit of movements String argument in drag&drop selenium action

  1. Percentage
  2. cm
  3. pixel
  4. inches

Answer: 3)pixel

6.What is the default page load strategy followed by geckodriver ?

  1. interactive
  2. normal
  3. None of these
  4. complete

Answer: 2)normal

7.Can Selenium interact with hidden elements ?

  1. False
  2. True

Answer: 2)True

8.Which of the following ends with same as Xpath ends with

  1. ^=
  2. *=
  3. &=
  4. $=

Answer: 4)$=

9.Selenium WebDriver not supoort

  1. Recording
  2. Programming
  3. Batch Testing
  4. Text Execution

Answer: 1)Recording

10.Taking Screenshot is possiable with HtmlUnit Driver ?

  1. False
  2. True

Answer: 1)False

11.Which of the following language bindings are not developed by SeleniumHQ

  1. Perl
  2. Python
  3. Ruby
  4. JavaScript(node)

Answer: 1)Perl

12.Which of the following applications can interact with selenium ?

  1. Silverlight based application
  2. DOM based application
  3. None of these
  4. Flash based application

Answer: 2)DOM based application

13.What is the correct syntax to instantiate a FireFox session

  1. WebDriver driver = new GeckoDriver()
  2. WebDriver driver = new firefoxDriver()
  3. WebDriver driver = new geckoDriver()
  4. WebDriver driver = new FirefoxDriver()

Answer: 4)WebDriver driver = new FirefoxDriver()

14.What is the correct syntax to instantiate a Chrome session

  1. WebDriver driver = new chrome()
  2. WebDriver driver = new chromeDriver()
  3. WebDriver driver = new Driverchrome()
  4. WebDriver driver = new ChromeDriver()

Answer: 4)WebDriver driver = new ChromeDriver()

15.Which of the following programming language is not supported by selenium webdriver ?

  1. ASP.NET
  2. None of these
  3. JavaScript
  4. Python

Answer: 1)ASP.NET

16.Which of the following options are valid ways to access an element by id?

  1. driver.findElement(By.xpath("//*[id='plans']"))
  2. driver.findElement(By.xpath("//*[@id='plans']"))
  3. None of these
  4. driver.findElement(By.xpath("//*[@id=”plans”]"))

Answer: 2)driver.findElement(By.xpath("//*[@id='plans']"))

17.Which of the following programming language is supported by selenium webdriver ?

  1. ASP
  2. SQL
  3. Cobol
  4. Perl

Answer: 4)Perl

18.What is the WebElement method used to get the BackGroud Color of an Element displayed in the WebPage.

  1. getCssText(“background-color”)
  2. getCssValue(“background-color”)
  3. getCss(“color”)
  4. getCssValue(“bg-color”)

Answer: 2)getCssValue(“background-color”)

19.Which tool is appropriate to set up a Selenium 2.0 Java project

  1. Maven
  2. pip
  3. Depends upon the project
  4. Signed dlls

Answer: 1)Maven

20.In webdriver selenium _______ component helps to run multiple tests simultaneously in diffrent browsers & platforms.

  1. Selenium Grid
  2. Selenium RC
  3. Selenium IDE
  4. Selenium WebDriver

Answer: 1)Selenium Grid

21.What is the proper command to navigate to (“https://apps.fresco.me”)?

  1. driver.navigate().to(“https://apps.fresco.me”)
  2. driver.navigate(“https://apps.fresco.me”)
  3. driver.navigate().toUrl(“https://apps.fresco.me”)
  4. driver.navigate.to()(“https://apps.fresco.me”)

Answer: 1)driver.navigate().to(“https://apps.fresco.me”)

22.What is the main transport mechanism used by WebDriver

  1. AJAX
  2. JSON
  3. HTTP
  4. Websocket

Answer: 3)HTTP




If you have any queries, please feel free to ask on the comment section.
If you want MCQs and Hands-On solutions for any courses, Please feel free to ask on the comment section too.

Please share and support our page!

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !

Join Telegram Channel

Join MNCAnswers To Get Instant Updates

Join Telegram Channel