×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Selenium Multiple-Choice Questions (MCQs)

Selenium is an open source umbrella project for a range of tools and libraries aimed at supporting browser automation.

Selenium MCQs: This section contains multiple-choice questions and answers on the various topics of Selenium. Practice these MCQs to test and enhance your skills on Selenium.

List of Selenium MCQs

1. When was selenium developed?

  1. 2004
  2. 2005
  3. 2006
  4. 2001

Answer: A) 2004

Explanation:

Selenium was developed in 2004.

Discuss this Question


2. Who developed selenium?

  1. Dan Cuellar
  2. Jason Huggins
  3. Rossmanith Gmbh

Answer: B) Jason Huggins

Explanation:

Selenium was developed by Jason Huggins.

Discuss this Question


3. Does selenium support a variety of languages?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, Selenium supports a variety of languages like Java, Python, Perl, PHP, Ruby, and C#.

Discuss this Question


4. Can we deploy selenium on different platforms other than windows?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, Selenium can be deployed on different platforms like Linux, Macintosh, and Solaris.

Discuss this Question


5. Which of the following browsers supports selenium?

  1. Google Chrome
  2. Safari
  3. Mozilla Firefox
  4. Internet Explorer
  5. All of the above

Answer: E) All of the above

Explanation:

The following browsers support selenium: Google Chrome, Safari, Mozilla Firefox, and Internet explorer.

Discuss this Question


6. What is selenium, select the best answer.

  1. Selenium is the open-source test automated tool to test web-based UI which only supports JavaScript’s
  2. Selenium is the open-source test automated tool to test web-based UI which supports many different languages like Java, Python, Perl, PHP, Ruby, and C#.
  3. Selenium is a behavioral testing tool that supports many different languages like Java, Python, Perl, PHP, Ruby, and C#.

Answer: B) Selenium is the open-source test automated tool to test web-based UI which supports many different languages like Java, Python, Perl, PHP, Ruby, and C#.

Explanation:

Selenium is the open-source test automated tool to test web-based UI which supports many different languages like Java, Python, Perl, PHP, Ruby, and C#, and also supports multiple OS.

Discuss this Question


7. What do you mean by open-source software?

  1. Open-source software is software that circulated across the world with its source code which also means it is available for use, and modification.
  2. Open-source software is software that is easy to use and where the code is stored in a public repository also it comes with a distributed license.
  3. All of the above

Answer: C) All of the above

Explanation:

Open-source software is software that is easy to use and circulated across the world with its source code where the code is stored in the public repository which also means it is available for use and modification and it comes with a distributed license.

Discuss this Question


8. What is UI testing?

  1. Web User Interface (UI) Testing is a mechanism for testing the features of any software a user will interact with including the fonts, color, design, etc.
  2. Web User Interface (UI) Testing is a mechanism for testing only the performance of the software but it does not cover the testing of fonts, color, etc

Answer: A) Web User Interface (UI) Testing is a mechanism for testing the features of any software a user will interact with including the fonts, color, design, etc.

Explanation:

Web User Interface (UI) Testing is a mechanism for testing the features of any software a user will interact with including the fonts, color, design, etc.

Discuss this Question


9. Which of the following is not the alternative to selenium?

  1. Cucumber
  2. Cypress
  3. Puppeteer
  4. Mocha

Answer: D) Mocha

Explanation:

Among all the framework Mocha framework is not the alternative to selenium as selenium is used for Web-based testing whereas Mocha has a different task. Rest other given frameworks like cucumber, cypress and puppeteer can be used as selenium alternatives.

Discuss this Question


10. Check whether the given statement is true or false?
'Selenium web driver does not require server installation, test scripts interact directly with the browser.'

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, the selenium web driver does not require server installation, here test scripts interact directly with the browser.

Discuss this Question


11. Does selenium support ASP.NET language?

  1. Yes
  2. No

Answer: B) NO

Explanation:

No, ASP.NET is not supported by selenium.

Discuss this Question


12. What is QTP?

  1. Quick test professional
  2. Quick test personal
  3. Quick testing-tool professional

Answer: A) Quick test professional

Explanation:

QTP stands for a quick test professional.

Discuss this Question


13. Does QTP supports different environment?

  1. Yes
  2. No

Answer: B) NO

Explanation:

Unlike selenium, QTP supports only windows.

Discuss this Question


14. How many components does selenium have?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: C) 4

Explanation:

Selenium has four components: Selenium (IDE), Selenium Remote Control (Now Deprecated), WebDriver, and Selenium Grid.

Discuss this Question


15. What is selenium IDE?

  1. Selenium integrated distributed environment
  2. Selenium integrated development environment
  3. Selenium integrated dispense environment

Answer: B) Selenium integrated development environment.

Explanation:

Selenium IDE stands for selenium integrated development environment.

Discuss this Question


16. Which selenium component allows to record and playback of the scripts?

  1. Selenium (IDE)
  2. Selenium Remote Control
  3. WebDriver
  4. Selenium Grid.

Answer: A) Selenium IDE

Explanation:

Selenium IDE components allow to record and playback of the scripts.

Discuss this Question


17. Which selenium component is also known as selenium 1?

  1. Selenium (IDE)
  2. Selenium Remote Control
  3. WebDriver
  4. Selenium Grid.

Answer: B) Selenium Remote control

Explanation:

Selenium Remote control is also known as selenium 1, but now it is deprecated.

Discuss this Question


18. Does selenium RC supports a record or playback feature just like selenium IDE?

  1. Yes
  2. No

Answer: B) NO

Explanation:

Selenium Remote control (RC) does not support record or playback features.

Discuss this Question


19. Selenium RC support which architecture?

  1. Event-driven architecture
  2. Master-slave architecture
  3. Client-server architecture
  4. Layered architecture

Answer: C) Client-server architecture

Explanation:

Selenium RC supports client-server architecture.

Discuss this Question


20. Selenium RC is based on ____.

  1. HTML
  2. JavaScript
  3. Python
  4. Ruby
  5. All of the above

Answer: B) JavaScript

Explanation:

Selenium RC is based on JavaScript.

Discuss this Question


21. Which component of selenium is known as selenium 2?

  1. Selenium (IDE)
  2. Selenium Remote Control
  3. WebDriver
  4. Selenium Grid.

Answer: C) WebDriver

Explanation:

WebDriver component of selenium is known as selenium 2.

Discuss this Question


22. Which component of selenium is the most important component?

  1. Selenium (IDE)
  2. Selenium Remote Control
  3. WebDriver
  4. Selenium Grid.

Answer: C) WebDriver

Explanation:

WebDriver component of selenium is the most important component of selenium and it was developed to solve the problem of selenium 1.

Discuss this Question


23. Among Selenium RC and Selenium WebDriver which component is fastest?

  1. Selenium Remote Control
  2. WebDriver

Answer: B) WebDriver

Explanation:

Selenium WebDriver is faster than selenium RC.

Discuss this Question


24. Which selenium component is used to run tests on dissimilar machines against different browsers in parallel?

  1. Selenium Remote Control
  2. WebDriver
  3. Selenium (IDE)
  4. Selenium Grid.

Answer: D) Selenium Grid

Explanation:

Selenium grid component is used to run tests on dissimilar machines against different browsers in parallel.

Discuss this Question


25. How many components does selenium IDE has?

  1. 5
  2. 6
  3. 7
  4. 10

Answer: C) 7

Explanation:

Selenium IDE has 7 components: Menu Bar, Tool Bar, Address Bar, Test Case Pane, Test Script Editor Box, Start/Stop Recording Button, Log, and Reference Pane.

Discuss this Question


26. What is the other name for selenium commands?

  1. Selenium scripts
  2. Simple scripts
  3. Selenese
  4. Scripts

Answer: C) Selenese

Explanation:

Selenium commands are also known as Selenese.

Discuss this Question


27. How many types of selenium commands are there?

  1. 5
  2. 3
  3. 7
  4. 10

Answer: B) 3

Explanation:

Selenium commands are of three types: Actions, Accessors, and Assertions.

Discuss this Question


28. Which type of selenium commands operate the state of the application?

  1. Actions
  2. Accessors
  3. Assertions

Answer: A) Actions

Explanation:

Action commands operate the state of the application. Some of the action commands are: click(locator), focus(locator), close etc

Discuss this Question


29. Which type of selenium command is responsible to store the results in variables?

  1. Actions
  2. Accessors
  3. Assertions

Answer: B) Accessors

Explanation:

Accessors are the type of commands which is responsible to store the result in variables. Some of the accessor's commands are storeValue (locator, variable name), storeText (locator, variable name), etc.

Discuss this Question


30. Which type of selenium command use testers to verify the state of the application?

  1. Actions
  2. Accessors
  3. Assertions

Answer: C) Assertions

Explanation:

Assertions use testers to verify the state of the application. Some of the assertion commands are verifyAlert(pattern), verifyAllButtons (pattern), and waitForErrorOnNext (message).

Discuss this Question


31. How many components does selenium WebDriver architecture has?

  1. 3
  2. 4
  3. 5
  4. 6

Answer: B) 4

Explanation:

There are four components in WebDriver architecture: Selenium Language Bindings, JSON Wire Protocol, Browser Drivers, and Real Browsers.

Discuss this Question


32. Among selenium RC and selenium WebDriver which component is purely object-oriented API?

  1. Selenium RC
  2. Selenium WebDriver

Answer: B) Selenium WebDriver

Explanation:

Selenium WebDriver is a purely object-oriented API component in the selenium suite.

Discuss this Question


33. Does selenium RC supports OS for mobile applications also?

  1. Yes
  2. No

Answer: B) NO

Explanation:

Selenium RC does not support testing for mobile applications.

Discuss this Question


34. How do you run the selenium web script driver on the chrome browser?

  1. Chromescript
  2. Chromescriptdriver
  3. Chromedriver
  4. Chrometestdriver

Answer: C) Chromedriver

Explanation:

Selenium uses ChromeDriver to run web script driver on the chrome browser.

Discuss this Question


35. What is IEDriver?

  1. It is a driver that web driver uses to control chrome driver.
  2. It is a driver that web driver uses to control Fire fox driver.
  3. It is a driver that web driver uses to control Internet Explorer driver.
  4. It is a driver that web driver uses to control safari driver.

Answer: C) It is a driver that web driver uses to control Internet Explorer driver.

Explanation:

IEDriver is known as InternetExplorerdriver, it is a driver that web driver uses to control Internet Explorer driver.

Discuss this Question


36. Is the findelements method and findelement method both are same in selenium?

  1. Yes
  2. No

Answer: B) NO

Explanation:

No, both are used differently in selenium.

Discuss this Question


37. When you only want to access a single element on a web page which method will you use?

  1. Findelement method
  2. Findelements method

Answer: A) Findelement method

Explanation:

Findelement method will be used in a situation where you only want to access a single element on a web page.

Discuss this Question


38. If the method fails to find the element which of the two methods throws you the exception?

  1. Findelement method
  2. Findelements method

Answer: A) Findelement method

Explanation:

Findelement method will throw you the exception named as NoSuchElementException, whereas findelements method will not show any exception.

Discuss this Question


39. How many locators does selenium have?

  1. 3
  2. 5
  3. 7
  4. 8

Answer: D) 8

Explanation:

There are total locators in selenium which are as follows: ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector, XPath.

Discuss this Question


40. Among all the given locators which locator is the fastest of all?

  1. XPath
  2. Link text
  3. ID
  4. CSS selector

Answer: C) ID

Explanation:

Since IDs are always unique and because of this reason, this is known to be the fastest locator in selenium.

Discuss this Question


41. Among all the given locators which locator is the slowest of all?

  1. XPath
  2. Link text
  3. ID
  4. CSS selector

Answer: A) XPath

Explanation:

Among all the locators XPath locator delays the result. Among all the locators XPath locator delays the result.

Discuss this Question


42. How many types of Xpath are there in selenium?

  1. 3
  2. 2
  3. 4
  4. 5

Answer: B) 2

Explanation:

There are two types of Xpath in selenium: Absolute and relative XPath.

Discuss this Question


43. Which of the following is the correct syntax for XPath?

  1. Xpath=//tagname[@Attribute='value']
  2. Xpath=//value[@Attribute='tagname']
  3. Xpath=//Attribute[@tagname='value']
  4. Xpath=//value[@tagname='attribute']

Answer: A) Xpath=//tagname[@Attribute='value']

Explanation:

Syntax for XPath is: Xpath=//tagname[@Attribute='value']

Discuss this Question


44. Which type of XPath starts with a single forward slash?

  1. Relative XPath
  2. Absolute XPath

Answer: B) Absolute XPath

Explanation:

Absolute XPath starts with a single forward slash.

Discuss this Question


45. Which type of XPath starts with a double forward slash?

  1. Relative XPath
  2. Absolute XPath

Answer: A) Relative XPath

Explanation:

Relative XPath starts with a double forward slash.

Discuss this Question


46. The ____ search dissimilar nodes in the XML document from the current node?

  1. Relative XPath
  2. Absolute XPath
  3. XPath Axes
  4. Dynamix XPath

Answer: C) XPath Axes

Explanation:

The XPath axes search different nodes in the XML document from the current node.

Discuss this Question


47. Which of the following class is used for dropdown in selenium?

  1. HTML selects
  2. Select
  3. Dropdown

Answer: B) Select

Explanation:

Select class is used for dropdown in selenium, it is a WebDriver that is responsible for implementing HTML select tag.

Discuss this Question


48. Which of the following is the correct syntax to use Select class?

  1. Select dropdown = new Select(<WebElement>)
  2. select dropdown = new select(<Element>)
  3. Select dropdown = Select(<WebElement>)

Answer: A) Select dropdown = new Select(<WebElement>)

Explanation:

The correct syntax for the Select class is: Select dropdown = new Select(<WebElement>)

Discuss this Question


49. Is it important that the Select class should always start with Capital 'S'?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, whenever you use the Select class, 'S' should be always capital.

Discuss this Question


50. What is the role of the AutoIT tool in selenium?

  1. Helps in formatting the file
  2. Helps in uploading the file
  3. Helps in formatting the webpage

Answer: B) Helps in uploading the file

Explanation:

AutoIT is an open-source tool that is used to upload files in Selenium WebDriver.

Discuss this Question


51. Can you upload the file using the Sendkeys method in selenium WebDriver?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, sendkeys method is one of the upfront methods to upload the file in Selenium WebDriver. AutoIT tool is also an alternative for this.

Discuss this Question


52. Which of the following method allows you to change control from one window to other?

  1. SwapTo ()
  2. SwitchTo ()
  3. Swap ()
  4. Switch ()

Answer: B) SwitchTo ()

Explanation:

SwitchTo () method allows us to change/switch control from one window to other.

Discuss this Question


53. In selenium 4, which of the following method allows us to take a screenshot of a specific web element?

  1. GetScreenshot ()
  2. getScreenshotAs ()
  3. ScreenshotAs ()

Answer: B) getScreenshotAs ()

Explanation:

getScreenshotAs () allows us to take a screenshot of a specific web element.

Discuss this Question


54. In selenium 4, is there any method to take a screenshot of the entire page?

  1. Yes
  2. No

Answer: A) YES

Explanation:

In selenium 4, if you want to take a screenshot of the entire page you can use getFullPageScreenshotAs () method for fire fox.

Discuss this Question


55. Which exception is shown in selenium when there is a delay in the loading time of the elements with which we are interacting?

  1. Not Visible Exception
  2. Element Not Visible Exception
  3. Load Time Exceeding Exception

Answer: B) Element Not Visible Exception

Explanation:

The element Not Visible Exception is shown in selenium when there is a delay in the loading time of the elements with which we are interacting.

Discuss this Question


56. How many types of wait commands does the selenium web driver provide?

  1. 2
  2. 4
  3. 3
  4. 5

Answer: C) 3

Explanation:

Selenium Web Driver provides us with three types of wait commands: Implicit wait, Explicit wait, and Fluent wait.

Discuss this Question


57. Which type of wait command waits for a certain amount of time before it throws an exception?

  1. Implicit wait
  2. Explicit wait
  3. Fluent Wait

Answer: A) Implicit wait

Explanation:

Implicit wait for a certain amount of time before it throws an exception.

Discuss this Question


58. How many parameters do implicit waits take up?

  1. 3
  2. 4
  3. 5
  4. 2

Answer: D) 2

Explanation:

Implicit waits take 2 parameters.

Discuss this Question


59. Which of the following waits takes timeout and polling frequency as its parameter?

  1. Implicit wait
  2. Fluent wait

Answer: B) Fluent wait

Explanation:

Fluent waits take 2 parameters which are timeout and polling frequency.

Discuss this Question


60. Which open-source tool allows us to read and write MS Excel files using Java?

  1. Apache Map-reduce
  2. Apace POI
  3. AutoIT
  4. None of the above

Answer: B) Apache POI

Explanation:

Apache POI is an open-source tool that allows us to read and write MS Excel files using Java.

Discuss this Question


61. ____ browser is a browser that doesn't have a GUI?

  1. Chrome
  2. Plain
  3. Headless
  4. Error-free

Answer: C) Headless

Explanation:

Headless browser is a browser that doesn't have a GUI.

Discuss this Question




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.