Selenium (WebDriver)Testing Framework

0%

Is the following statement true or false?
"The Data Driven Framework allows scripts to run in parallel."

Correct! Wrong!

Explanation
The correct answer >br> True

Which of the WebDriver methods is used to count the number of elements?

Correct! Wrong!

Explanation
The correct answer >br> driver.findElements(By.id("search")).size()

Which WebDriver command moves you forward in the browser's history by one page?

Correct! Wrong!

Explanation
This method in WebDriver allows the web browser to click the forward button in the current browser window. It doesn't accept anything and doesn't return anything. driver.navigate ().forward ();

To locate an element using inner text, which of the following syntax would you use?

Correct! Wrong!

Explanation
css=[HTML tag]<[:][contains][(inner text)] [:]:- It is used to symbolize contains method. Contains: It will include the value of a Class attribute. Text: The text that is displayed anywhere on the web page irrespective of its location.

Which of the following commands will assist you in determining the presence of a specific element?

Correct! Wrong!

Explanation
verifyElementPresent – returns TRUE if the supplied element was FOUND on the page; FALSE otherwise . verifyElementNotPresent – returns TRUE if the specified element was NOT FOUND on the page; FALSE if it is.

Which of the following Webdriver techniques navigates to a URL?

Correct! Wrong!

Explanation
Code for navigate to url using navigate ().to (). get () is the method of Webdriver interface, that's why it directly accessible using web driver’s reference. Although navigator is the method of Navigator interface which is further implement by RemoteNavigator class.

Which of the following Webdriver statements returns the text of an html element?

Correct! Wrong!

Explanation
The getText() command will retrieve the inner text of the specified web element. This command can be used to check for expected messages or errors that would appear while automating the web page.

Using the POI excel API, which of the following code may be used to generate an excel automation object?

Correct! Wrong!

Explanation
The correct answer >br> File excelobj = new File ();

What is the purpose of the method getWindowHandle()?

Correct! Wrong!

Explanation
The correct answer >br> Method will get the handle of the page the Webdriver is currently controlling.

Is the following statement true?
"The concept of function libraries cannot be implemented in the Data Driven Framework."

Correct! Wrong!

Explanation
The correct answer >br> No

Which of the following benefits of the Page Object Model is not true?

Correct! Wrong!

Explanation
The correct answer >br> POM allows to support execution in multiple browsers.

Which of the following is not a valid UI automation framework component?

Correct! Wrong!

Explanation
A unique name for a database connection established by a server in the Java software platform.

For headless browser testing, which of the following WebDrivers is used?

Correct! Wrong!

Explanation
HtmlUnitDriver is a headless driver that provides a non-GUI Selenium WebDriver implementation. It is built on HtmlUnit, a Java-based fast and lightweight browser.

In Selenium, which of the following types of text patterns is used?

Correct! Wrong!

Explanation
The text matching pattern globbing is utilized in selenium. It allows you to utilize the target column of the command to describe the expected text pattern and use it with the verify and assert commands.

What is the Selenium phrase for an argument that begins with "//"?

Correct! Wrong!

Explanation
The XPath query language is used to pick nodes from an XML document. Additionally, XPath can be used to compute values from an XML document's content. The World Wide Web Consortium created XPath.

What is the function of contextClick()?

Correct! Wrong!

Explanation
contextClick Method in Action Class: Using contextClick Method we perform Right click operation on WebElement. contextClick Method perform important role in Action class when we want to perform Right Click operation. contextClick Method is time consuming as well as we don’t need to use KeyBoard Events to perform Right Click operation.

In WebDriver, what is the role of the actions class?

Correct! Wrong!

Explanation
The Actions class is a built-in feature that allows you to handle a variety of keyboard and mouse events.

Which of the following is JavaScript's default state in HTMLUnitDriver?

Correct! Wrong!

Explanation
JavaScript is disabled by default in the HtmlUnit driver. If you try to run JavaScript in a HtmlUnit driver test, an error notice will appear in the console, and your test case will fail.

In the case of WebDriver, which of the following is correct?

Correct! Wrong!

Explanation
A WebDriver is an interface that extends the search context interface, and it is implemented by several browser subclasses.

Which of the following statements about the keyword-driven framework is correct?

Correct! Wrong!

Explanation
The correct answer >br> It is best suited for functional testing and is a functional automation testing framework.

Which of the WebDriver methods below allows you to switch between named windows?

Correct! Wrong!

Explanation
The goal of WebDriver is to make it easy to switch between named windows. method "switchTo" driverswitchTo (). "windowName"

Which Selenium WebDriver component does not have any APIs exposed?

Correct! Wrong!

Explanation
Selenium Grid is a component of the Selenium Suite that allows you to run many tests in parallel across multiple browsers, operating systems, and machines. It is accomplished by passing the commands of distant browser instances through a hub server.

Which browser is the only one that allows you to utilize Selenium IDE?

Correct! Wrong!

Explanation
The Selenium-IDE (Integrated Development Environment) is a simple Firefox plug-in that allows you to create Selenium test cases. It provides a graphical user interface for recording user actions in Firefox, which is used to learn and utilize Selenium. However, it can only be used with Firefox because other browsers are not supported.

Which of the following is the preferred method for dealing with dynamic elements?

Correct! Wrong!

Explanation
Use contains or starts with text in Relative XPath. When dealing with dynamic web elements, this is the preferred method.

In Internet Explorer, which of the following WebDriver classes is used to execute Selenium tests?

Correct! Wrong!

Explanation
The Selenium IE driver, commonly known as IEDriverServer, is a Selenium WebDriver for Internet Explorer. It's a stand-alone server that functions as a gateway between the browser (i.e., Internet Explorer) and the Selenium script. To begin cross-browser testing with Internet Explorer, you must first download and install the Selenium Internet Explorer Driver.