Selenium Webdriver Test: Quiz!

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Abdul
A
Abdul
Community Contributor
Quizzes Created: 8 | Total Attempts: 24,858
| Attempts: 843 | Questions: 30
Please wait...
Question 1 / 30
0 %
0/100
Score 0/100
1. Select the variation which finds elements based on the driver's underlying CSS selector engine in Web driver Selenium.

Explanation

The correct answer is "By.cssSelector". This variation is used to find elements based on the driver's underlying CSS selector engine in Web driver Selenium. It allows the user to locate elements using CSS selectors, which are powerful and flexible for targeting specific elements on a webpage.

Submit
Please wait...
About This Quiz
Selenium Webdriver Test: Quiz! - Quiz

The 'Selenium WebDriver Test: Quiz!' assesses knowledge on Selenium's capabilities and limitations across various platforms and programming languages. It focuses on practical skills in automating web application testing using Selenium, covering different tools and methods within the Selenium suite.

Personalize your quiz and earn a certificate with your name on it!
2. Select the method which selects the option at the given index.

Explanation

The correct method to select an option at a given index is "selectByIndex()". This method allows the user to select an option from a dropdown menu by specifying the index number of the option.

Submit
3. The Selenium can:

Explanation

Selenium is a widely used open-source framework for automating web browsers. It provides a set of tools and libraries for interacting with web elements, performing actions, and verifying the behavior of web applications. However, Selenium is specifically designed for testing web applications and does not have built-in capabilities to access controls within the desktop or test desktop applications. Therefore, the correct answer is that Selenium can only test web applications.

Submit
4. Which command can be used to enter values onto text boxes?

Explanation

The correct answer is sendKeys(). This command is used to enter values onto text boxes. It is a method that is commonly used in automation testing to simulate keyboard input. By using sendKeys(), the test script can interact with text boxes by sending the desired input to them.

Submit
5. Which method is used when you want to verify whether a certain check box, radio button or option in a drop-down box is selected in Web driver Selenium?

Explanation

The isSelected() method is used to verify whether a certain checkbox, radio button, or option in a dropdown box is selected in Selenium WebDriver. This method returns a boolean value, true if the element is selected and false if it is not.

Submit
6.  Select the variation which locates elements by the value of the "name" attribute in Web driver Selenium.

Explanation

The correct answer is By.name because the By.name method in Selenium WebDriver is used to locate elements by their "name" attribute. This method allows you to find elements by the value specified in the "name" attribute of the HTML tag.

Submit
7. Select the command in Selenium IDE used to open a page using the URL.

Explanation

The correct command in Selenium IDE used to open a page using the URL is "Open". This command instructs Selenium to navigate to the specified URL and open the corresponding webpage.

Submit
8. Select the method which clears all selected entries in Web driver Selenium

Explanation

The correct method to clear all selected entries in Web driver Selenium is "deselectAll()". This method is used to deselect all options that have been previously selected in a multi-select dropdown or list box. By calling this method, all selected entries will be cleared and no options will remain selected.

Submit
9. Select the language which is NOT supported by the Selenium RC.

Explanation

Selenium RC supports multiple programming languages for writing test scripts, including Java, C#, and PHP. However, ASP (Active Server Pages) is not supported by Selenium RC. ASP is a server-side scripting language primarily used for creating dynamic web pages and applications on Microsoft servers. Therefore, the correct answer is ASP.

Submit
10. The following codes both print: Welcome to HotelApplication.com System.out.println(driver.getTitle()); System.out.println(driver.findElement(By.tagName("title")).getText())

Explanation

The given answer is true because both lines of code will print the same output, which is "Welcome to HotelApplication.com". The first line of code uses the `getTitle()` method to retrieve the title of the webpage, while the second line of code uses the `findElement()` method with the `By.tagName()` locator to find the title element and then retrieves its text. Since both methods are used to retrieve the same information, they will produce the same output.

Submit
11. Consider the following code snippet WebDriverWait wait = new WebDriverWait(driver, 30); wait.until(ExpectedConditions.presenceOfElementLocated(by)); This is an example of an implicit wait.

Explanation

The given code snippet is an example of an explicit wait, not an implicit wait. An implicit wait is a setting that is applied globally and is used to wait for a certain amount of time for elements to be found before throwing an exception. In the given code, a WebDriverWait object is created with a specific timeout value of 30 seconds, and it is used to wait for the presence of an element located by the specified By object. This is an example of explicit wait, where the wait condition is explicitly defined and applied to a specific element.

Submit
12. In web driver, which of the following is a valid select statement that selects a value from a drop-down element?

Explanation

The correct answer is "all above" because all three select statements mentioned (selectByIndex(), selectByVisibleText(), selectByValue()) are valid ways to select a value from a drop-down element in WebDriver. selectByIndex() selects an option by its index, selectByVisibleText() selects an option by its visible text, and selectByValue() selects an option by its value attribute.

Submit
13. Select the Get command which fetches the inner text of the element that you specify in Web driver Selenium.

Explanation

The correct answer is getText(). This method is used in Selenium WebDriver to fetch the inner text of an element on a webpage. It retrieves the visible text contained within the specified element, excluding any HTML tags or attributes. Therefore, getText() is the appropriate command to use in order to obtain the inner text of an element in Selenium WebDriver.

Submit
14. In WebDriver, which command can be used to enter values onto text boxes?

Explanation

The correct answer is sendKeys("text"). This command is used in WebDriver to enter values onto text boxes. It allows the user to input text by sending a series of keyboard keys to the element. The "text" parameter represents the value that will be entered into the text box.

Submit
15. Consider the following code snippet WebDriverWait wait = new WebDriverWait(driver, 30); wait.until(ExpectedConditions.presenceOfElementLocated(by)); This is an example of an implicit wait.

Explanation

The given code snippet is an example of an explicit wait, not an implicit wait. In an implicit wait, the WebDriver waits for a certain amount of time for elements to appear on the page before throwing an exception. However, in the given code, the WebDriverWait class is being used to explicitly wait for the presence of an element located by the specified By object. Therefore, the correct answer is False.

Submit
16. Which Selenium component supports All Operating System?

Explanation

Selenium WebDriver supports all operating systems. It is a powerful tool that allows users to automate browser interactions and perform tests on various web applications across different operating systems. It provides a programming interface for creating and executing test cases, making it compatible with Windows, Mac, Linux, and other operating systems.

Submit
17. In Webdriver, which of the following commands retrieves the text of an html element?

Explanation

The correct answer is getText(). This command is used in Webdriver to retrieve the text of an HTML element. It allows the user to extract the visible text present within the element, such as the text displayed on a webpage or within a specific element. This command is commonly used in test automation to verify the expected text content of an element on a webpage.

Submit
18. Select the language which is supported by The Selenium Web Driver.

Explanation

The correct answer is Perl because Selenium Web Driver supports multiple programming languages, including Perl, for writing test scripts and automating web applications. Perl is a widely used scripting language known for its flexibility and powerful text processing capabilities, making it a suitable choice for web automation tasks.

Submit
19. Which Component is used to run multiple tests simultaneously in different browsers and platforms?

Explanation

Selenium Grid is the correct answer because it is specifically designed to run multiple tests simultaneously in different browsers and platforms. It allows users to distribute test cases across multiple machines and execute them in parallel, thereby saving time and increasing efficiency. Selenium IDE, Selenium RC, and Selenium Webdriver are other components of Selenium but they do not have the capability to run tests simultaneously in different browsers and platforms like Selenium Grid does.

Submit
20. Select the command which is used to pause execution until the page is loaded completely.

Explanation

The command "waitForPageToLoad" is used to pause the execution of a script until the page is fully loaded. This command ensures that the script does not proceed with further actions until all the elements on the page have finished loading.

Submit
21. In web driver, which command takes you forward by one page on the browser's history?

Explanation

The correct answer is navigate().forward(). This command is used in WebDriver to navigate forward by one page on the browser's history. It is a method that is called on the navigate object, which represents the browser's navigation interface. By using this command, you can simulate the action of clicking the forward button on the browser, moving to the next page in the history.

Submit
22. The Selenium Bottom of Form

Explanation

Selenium is a popular automation testing tool that is used for web application testing. It provides professional customer support, generates test reports automatically, and comes with a built-in object repository. However, one limitation of Selenium is that it cannot access elements outside of the web application under test. This means that it cannot interact with elements on other applications or systems outside of the web application being tested.

Submit
23. The Web driver is used:

Explanation

The correct answer is to execute tests on the HtmlUnit browser. The HtmlUnit browser is a headless browser that allows for automated testing of web applications. It does not require a graphical user interface, making it faster and more efficient for running tests. Using the Web driver, tests can be written and executed on the HtmlUnit browser, providing a reliable and efficient way to test web applications.

Submit
24. In web driver, what is the method that counts the number of elements?

Explanation

The correct answer is "driver.findElements(By.id("search")).size()". This is because the method "findElements" is used to locate all elements that match the given locator strategy, in this case, By.id("search"). The method returns a list of elements, and the "size()" method is then used to count the number of elements in that list.

Submit
25.  In the case of Selenium IDE, the Source view shows your script in:

Explanation

The Source view in Selenium IDE shows the script in HTML format. This means that the script is displayed as HTML code, which is the standard markup language used for creating web pages. This format allows users to view and edit the script using HTML syntax, making it easier to understand and modify the script as needed.

Submit
26. Select the method which performs a context-click at the current mouse location.

Explanation

The correct answer is "contextClick()". This method is the appropriate choice as it clearly indicates that it performs a context-click at the current mouse location. The other options do not follow the naming convention or do not accurately describe the action being performed.

Submit
27. The Selenium RC is used:

Explanation

Selenium RC (Remote Control) is a tool that allows running tests on different browsers and operating systems. It enables testers to execute tests on various browsers, excluding HtmlUnit, and different operating systems. This flexibility is beneficial as it ensures that the web application being tested is compatible and functions correctly across multiple platforms. Selenium RC is not specifically designed for creating tests with little or no programming knowledge, testing only against Firefox, or running a large test suite on multiple machines.

Submit
28.  In web driver, which methods navigate to a URL?

Explanation

The correct answer is "get("url")". This method is used in web driver to navigate to a URL. The other options mentioned, such as "goToUrl", "navigate.to", and "getUrl" are not valid methods in web driver for navigating to a URL.

Submit
29. Select the operating system which is NOT supported by Selenium IDE.

Explanation

Selenium IDE supports Linux, Solaris, and Windows operating systems, but it does not support Unix.

Submit
30. Consider the following HTML snippet.
  • Firefox
  • Google Chrome
  • Internet Explorer
  • Opera
  • Safari
Which CSS selector is a valid statement to select Opera?

Explanation

The correct answer is "css = ul > li:nth-of-type(4)". This CSS selector is using the ">" combinator to select the direct child "li" elements of the "ul" element, and then the ":nth-of-type(4)" pseudo-class to select the fourth "li" element. This will select the "li" element that contains the text "Opera".

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 23, 2018
    Quiz Created by
    Abdul
Cancel
  • All
    All (30)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Select the variation which finds elements based on the driver's...
Select the method which selects the option at the given index.
The Selenium can:
Which command can be used to enter values onto text boxes?
Which method is used when you want to verify whether a certain check...
 Select the variation which locates elements by the value of the...
Select the command in Selenium IDE used to open a page using the URL.
Select the method which clears all selected entries in Web driver...
Select the language which is NOT supported by the Selenium RC.
The following codes both print:...
Consider the following code snippet ...
In web driver, which of the following is a valid select statement that...
Select the Get command which fetches the inner text of the element...
In WebDriver, which command can be used to enter values onto text...
Consider the following code snippet ...
Which Selenium component supports All Operating System?
In Webdriver, which of the following commands retrieves the text of an...
Select the language which is supported by The Selenium Web Driver.
Which Component is used to run multiple tests simultaneously in...
Select the command which is used to pause execution until the page is...
In web driver, which command takes you forward by one page on the...
The Selenium Bottom of Form
The Web driver is used:
In web driver, what is the method that counts the number of elements?
 In the case of Selenium IDE, the Source view shows your script...
Select the method which performs a context-click at the current mouse...
The Selenium RC is used:
 In web driver, which methods navigate to a URL?
Select the operating system which is NOT supported by Selenium IDE.
Consider the following HTML snippet. ...
Alert!

Advertisement