Home » 
        MCQs
    
        
    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?
    
      - 2004
 
      - 2005
 
      - 2006
 
      - 2001
 
    
    Answer: A) 2004
    Explanation:
    Selenium was developed in 2004.
    
        Discuss this Question
    
    
    
	2. Who developed selenium?
    
      - Dan Cuellar
 
      - Jason Huggins
 
      - Rossmanith Gmbh
 
    
    Answer: B) Jason Huggins
    Explanation:
    Selenium was developed by Jason Huggins.
    
        Discuss this Question
    
    
    
	3. Does selenium support a variety of languages?
    
      - Yes
 
      - 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?
    
      - Yes
 
      - 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?
    
      - Google Chrome
 
      - Safari
 
      - Mozilla Firefox
 
      - Internet Explorer
 
      - 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.
    
      - Selenium is the open-source test automated tool to test web-based UI which only supports JavaScript’s
 
      - 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#.
 
      - 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?
    
      - Open-source software is software that circulated across the world with its source code which also means it is available for use, and modification.
 
      - 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.
 
      - 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?
    
      - 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.
 
      - 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?
    
      - Cucumber
 
      - Cypress
 
      - Puppeteer
 
      - 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.'
    
      - Yes
 
      - 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?
    
      - Yes
 
      - No
 
    
    Answer: B) NO
    Explanation:
    No, ASP.NET is not supported by selenium.
    
        Discuss this Question
    
    
    
	12. What is QTP?
    
      - Quick test professional
 
      - Quick test personal
 
      - 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?
    
      - Yes
 
      - No
 
    
    Answer: B) NO
    Explanation:
    Unlike selenium, QTP supports only windows.
    
        Discuss this Question
    
    
    
	14. How many components does selenium have?
    
      - 2
 
      - 3
 
      - 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?
    
      - Selenium integrated distributed environment
 
      - Selenium integrated development environment
 
      - 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?
    
      - Selenium (IDE)
 
      - Selenium Remote Control 
 
      - WebDriver
 
      - 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?
    
      - Selenium (IDE)
 
      - Selenium Remote Control
 
      - WebDriver
 
      - 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?
    
      - Yes
 
      - 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?
    
      - Event-driven architecture
 
      - Master-slave architecture
 
      - Client-server architecture
 
      - Layered architecture
 
    
    Answer: C) Client-server architecture
    Explanation:
    Selenium RC supports client-server architecture.
    
        Discuss this Question
    
    
    
	20. Selenium RC is based on ____.
    
      - HTML
 
      - JavaScript
 
      - Python
 
      - Ruby
 
      - 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?
    
      - Selenium (IDE)
 
      - Selenium Remote Control
 
      - WebDriver
 
      - 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?
    
      - Selenium (IDE)
 
      - Selenium Remote Control
 
      - WebDriver
 
      - 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?
    
      - Selenium Remote Control
 
      - 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?
    
      - Selenium Remote Control
 
      - WebDriver
 
      - Selenium (IDE)
 
      - 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?
    
      - 5
 
      - 6
 
      - 7
 
      - 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?
    
      - Selenium scripts
 
      - Simple scripts
 
      - Selenese
 
      - Scripts
 
    
    Answer: C) Selenese
    Explanation:
    Selenium commands are also known as Selenese.
    
        Discuss this Question
    
    
    
	27. How many types of selenium commands are there?
    
      - 5
 
      - 3
 
      - 7
 
      - 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?
    
      - Actions
 
      - Accessors
 
      - 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?
    
      - Actions
 
      - Accessors
 
      - 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?
    
      - Actions
 
      - Accessors
 
      - 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?
    
      - 3
 
      - 4
 
      - 5
 
      - 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?
    
      - Selenium RC
 
      - 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?
    
      - Yes
 
      - 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?
    
      - Chromescript
 
      - Chromescriptdriver
 
      - Chromedriver
 
      - Chrometestdriver
 
    
    Answer: C) Chromedriver
    Explanation:
    Selenium uses ChromeDriver to run web script driver on the chrome browser.
    
        Discuss this Question
    
    
    
	35. What is IEDriver?
    
      - It is a driver that web driver uses to control chrome driver.
 
      - It is a driver that web driver uses to control Fire fox driver.
 
      - It is a driver that web driver uses to control Internet Explorer driver.
 
      - 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?
    
      - Yes
 
      - 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?
    
      - Findelement method
 
      - 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?
    
      - Findelement method
 
      - 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?
    
      - 3
 
      - 5
 
      - 7
 
      - 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?
    
      - XPath
 
      - Link text
 
      - ID
 
      - 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?
    
      - XPath
 
      - Link text
 
      - ID
 
      - 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?
    
      - 3
 
      - 2
 
      - 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?
    
      - Xpath=//tagname[@Attribute='value']
 
      - Xpath=//value[@Attribute='tagname']
 
      - Xpath=//Attribute[@tagname='value']
 
      - 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?
    
      - Relative XPath
 
      - 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?
    
      - Relative XPath
 
      - 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?
    
      - Relative XPath
 
      - Absolute XPath
 
      - XPath Axes
 
      - 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?
    
      - HTML selects
 
      - Select
 
      - 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?
    
      - Select dropdown = new Select(<WebElement>)
 
      - select dropdown = new select(<Element>)
 
      - 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'?
    
      - Yes
 
      - 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?
    
      - Helps in formatting the file
 
      - Helps in uploading the file
 
      - 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?
    
      - Yes
 
      - 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?
    
      - SwapTo ()
 
      - SwitchTo ()
 
      - Swap ()
 
      - 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?
    
      - GetScreenshot ()
 
      - getScreenshotAs ()
 
      - 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?
    
      - Yes
 
      - 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?
    
      - Not Visible Exception
 
      - Element Not Visible Exception
 
      - 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?
    
      - 2
 
      - 4
 
      - 3
 
      - 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?
    
      - Implicit wait
 
      - Explicit wait
 
      - 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?
    
      - 3
 
      - 4
 
      - 5
 
      - 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?
    
      - Implicit wait
 
      - 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?
    
      - Apache Map-reduce
 
      - Apace POI
 
      - AutoIT
 
      - 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?
    
      - Chrome
 
      - Plain
 
      - Headless
 
      - Error-free
 
    
    Answer: C) Headless
    Explanation:
    Headless browser is a browser that doesn't have a GUI.
    
        Discuss this Question
    
    
    
    
  
    Advertisement
    
    
    
  
  
    Advertisement