Google News
logo
Selenium - Quiz(MCQ)
A)
Maven
B)
WebDriver
C)
Selenium IDE
D)
Selenium Grid

Correct Answer :   Maven


Explanation : Maven is not a Selenium Component. Maven is a build automation tool, specially used for Java projects.

A)
John Backus
B)
James Gosling
C)
Guido van Rossum
D)
Shinya Kasatani

Correct Answer :   Shinya Kasatani


Explanation : Selenium IDE was originally created by Shinya Kasatani.

A)
Andi Gutmans
B)
Jason Huggins
C)
Rasmus Lerdorf
D)
Richard Stallman

Correct Answer :   Jason Huggins


Explanation : Selenium was originally developed by Jason Huggins in 2004.

A)
echo
B)
print
C)
printf
D)
display

Correct Answer :   echo

A)
Selenium RC
B)
Selenium Grid
C)
Selenium IDE
D)
Selenium WebDriver

Correct Answer :   Selenium IDE


Explanation : Selenium IDE doesn’t support programming. Selenium IDE is an open source web automation testing tool. the full form of IDE is Integrated Development Environment.

A)
Flash Plug-in
B)
Java Software
C)
Firefox Plug-in
D)
Windows Software

Correct Answer :   Firefox Plug-in

A)
Selenium Intialization Development Environment
B)
Selenium Information Development Environment
C)
Selenium Interrelated Development Environment
D)
Selenium Integrated Development Environment

Correct Answer :   Selenium Integrated Development Environment

A)
poc.xml
B)
pom.xml
C)
pom.doc
D)
com.xml

Correct Answer :   pom.xml

A)
Checked
B)
Error
C)
Unchecked
D)
None of the above

Correct Answer :   Checked

A)
C & C++
B)
PHP & Java
C)
Python & C-Sharp
D)
JavaScript & Ruby

Correct Answer :   C & C++


Explanation : Selenium does not allow to use C++ & C programming languages.

A)
Internet Explorer
B)
Google Chrome
C)
Google Chrome & Mozilla Firefox
D)
Mozilla Firefox

Correct Answer :   Google Chrome & Mozilla Firefox


Explanation : Selenium IDE is supported both Google Chrome & Mozilla Firefox browsers.

A)
type()
B)
sendKeys("text")
C)
selenium.type()
D)
driver.type("text")

Correct Answer :   sendKeys("text")


Explanation : In WebDriver, sendKeys("text") command can be used to enter values onto text boxes.

A)
sendKey
B)
sendKey()
C)
sendsKeys()
D)
sendKeys()

Correct Answer :   sendKeys()

A)
C#
B)
PHP
C)
JAVA
D)
ASP

Correct Answer :   ASP

A)
Plateform
B)
programming language
C)
A testing framework inspired from JUnit and NUnit
D)
None of the above

Correct Answer :   A testing framework inspired from JUnit and NUnit

A)
True
B)
False
C)
Can not say
D)
--

Correct Answer :   False


Explanation : False! SelectAllOptions() is not a valid command In webdriver.

A)
close()
B)
quit()
C)
terminate()
D)
shutdown()

Correct Answer :   close()

A)
Id
B)
Xpath
C)
Name
D)
CSS Selector

Correct Answer :   Id


Explanation : Id is the most common way to find an element on a page.

A)
1 or more of the preceding character
B)
0 or 1 of the preceding character
C)
0 or more of the preceding character.
D)
All of th eabove

Correct Answer :   0 or more of the preceding character.


Explanation :

0 or more of the preceding character

Regular expression is use to search text or value on the page. In regular expression we use dome predefine special character for searching patterns or text like *, dot, [ ], ?, + etc.

[ ]: Single character that appears inside the brackets.
*: 0 or more of the preceding character.
+: 1 or more of the preceding character.
?: 0 or 1 of the preceding character.

Therefore, option C is the correct answer. 

A)
Auto complete for all common Selenium commands
B)
Support for Selenium user- extensions .jr file
C)
Intelligent field selection will use IDs, names, or XPath as needed.
D)
None of the above

Correct Answer :   Support for Selenium user- extensions .jr file

A)
findElements()
B)
findElement()
C)
getElement()
D)
searchElement()

Correct Answer :   findElement()

A)
By.nametag
B)
By.tagname
C)
By.nametags
D)
By.name

Correct Answer :   By.name

A)
findElementsByXpath
B)
findElementByXpath
C)
findElementByCssSelector
D)
None of the above

Correct Answer :   findElementsByXpath


Explanation : findElementsByXPath is the best call for finding multiple elements using XPath.

A)
VariablesStore
B)
storedVariables
C)
storedVars
D)
All of the above

Correct Answer :   storedVars

A)
pause
B)
assertElementPresent
C)
waitForElementPresent
D)
None of the above

Correct Answer :   waitForElementPresent


Explanation :

Pause : Pause is used to the stop or pause the execution process for specified time period.

AssertElemetPresent : AssertElemetPresent is used to identify whether the element is available on the page or not.

WaitForElementPresent : WaitForElementPresent is used to pause the execution process until expected element will not add on the page.
 
Therefore, WaitForElementPresent is the correct answer.

A)
getMultipleWindows()
B)
getWindowHandles()
C)
getWindowhandle()
D)
Both (B) and (C)

Correct Answer :   Both (B) and (C)

A)
WebDriver
B)
WebDriverWait
C)
WebElement
D)
getPageSource

Correct Answer :   WebDriverWait

A)
By.Selectcs
B)
By.cssSelector
C)
By.cssSelected
D)
By.cssSelection

Correct Answer :   By.cssSelector

A)
IsSelected()
B)
IsSelect()
C)
Is_Select()
D)
Is_Selected()

Correct Answer :   IsSelected()

A)
Selenium RC
B)
Selenium IDE
C)
Selenium Grid
D)
Selenium Webdriver

Correct Answer :   Selenium Grid

A)
get()
B)
getValue()
C)
getAttribute()
D)
getText()

Correct Answer :   getText()

A)
verifyAlert/assertAlert
B)
verifyTextPresent/assertTextPresent
C)
verifyElementPresent/assertElementPresent
D)
verifyAlertPresent/assertAlertPresent

Correct Answer :   verifyElementPresent/assertElementPresent

A)
FlexUI
B)
FlexUISelenium
C)
SeleniumFlex
D)
UIFlexSelenium

Correct Answer :   FlexUISelenium

A)
Terminal
B)
Web Driver
C)
Selenium Recorder
D)
None of the above

Correct Answer :   Selenium Recorder


Explanation : Selenium IDE is previously known as Selenium Recorder.

A)
Record
B)
Playback
C)
Batch Testing
D)
Both Record & Playback

Correct Answer :   Both Record & Playback


Explanation : Selenium webdriver doesn't support Record & Playback facility.

A)
isAlertPresent()
B)
titleIs()
C)
elementToBeClickable()
D)
textToBePresentInElement()

Correct Answer :   isAlertPresent()

A)
JRE 8.0 is the minimum requirement to run Selenium 3.0.
B)
Safari driver will get native support from Apple on MacOS (Sierra or later).
C)
No out of the box support for Firefox Webdriver after 47.0.1. Use Geckodriver for newer versions.
D)
All of the Above

Correct Answer :   All of the Above

A)
NoSuchElementException
B)
TimeoutException
C)
NoAlertPresentException
D)
ElementNotVisibleException

Correct Answer :   TimeoutException

A)
selectIndex()
B)
selectedByIndex()
C)
selectByIndex()
D)
selectByIndexes()

Correct Answer :   selectByIndex()

A)
deselectAll()
B)
dselectAll()
C)
dselect_All()
D)
deselect_All()

Correct Answer :   deselectAll()

A)
“?
B)
*+
C)
*. (star dot)
D)
.* (dot star)

Correct Answer :   .* (dot star)


Explanation :

Regular expression is used for searching text or value on the page. In regular expression we use dome predefine special character for searching patterns or text like *, dot, [ ], ?, + etc.

.* regular expression sequences are two-character sequence that translated as “0 or more occurrences of any character” or “anything or nothing.”

Therefore dot star are the correct answer.

A)
The first parameter is where it was created, and the second parameter is the name of cookie.
B)
The first parameter is the name of the cookie, and the second parameter is where it was created.
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   The first parameter is the name of the cookie, and the second parameter is where it was created.


Explanation :

The first parameter is the name of the cookie and the second parameter is where it was created.
 
Solution : DeleteCookie: deletecookie method is used to delete specific cookies. DeleteCookie method is defined by Delete_cookie(para1 , para2) , the first parameter is the name of the cookie and the second parameter is the path of the cookie.

Therefore option B is a correct.

A)
WebDriver driver = new FirefoxDriver();
B)
driver.get("http://www.google.com");
C)
DesiredCapabilities caps = new DesiredCapabilities();
D)
System.setProperty("webdriver.gecko.driver", "geckodriver path");

Correct Answer :   driver.get("http://www.google.com");

A)
Windows
B)
Linux
C)
Unix
D)
Mac OS X

Correct Answer :   Unix

A)
Perl
B)
ASP
C)
PHP
D)
Cobol

Correct Answer :   Perl

A)
Context_Click()
B)
Context.Click()
C)
Click_Context()
D)
ContextClick()

Correct Answer :   ContextClick()

A)
1111
B)
2222
C)
3333
D)
4444

Correct Answer :   4444


Explanation :

By default 4444 port number is used by selenium or some other application. If there is some other application are already use 4444 port , then first we have to block these applications or change port of these application then we are able to run selenium.

Therefore, 4444 is the correct answer.

A)
To test a web application against Firefox only
B)
To run your test against different browsers (except HtmlUnit) on different operating systems.
C)
To create tests with little or no prior knowledge in programming
D)
To run a huge test suite, that can be executed on multiple machines

Correct Answer :   To run your test against different browsers (except HtmlUnit) on different operating systems.

A)
To quickly create tests
B)
To design a test using Selenese
C)
To execute tests on the HtmlUnit browser.
D)
To test a web application against Firefox only.

Correct Answer :   To execute tests on the HtmlUnit browser.

A)
SelectByIndex()
B)
SelectByValue()
C)
SelectByVisibleText()
D)
All of the above

Correct Answer :   All of the above

A)
By DOM query
B)
BY CSS sector
C)
BY XPath query
D)
All of the above

Correct Answer :   By DOM query

A)
^=
B)
$=
C)
*=
D)
&=

Correct Answer :   $=


Explanation :

^= Match a prefix
$= Match a suffix
*= Match a substring

Therefore, $= is the correct answer.

A)
Command class
B)
Select class
C)
Actions class
D)
All of the above

Correct Answer :   Actions class

A)
NoSuchElementException
B)
ElementNotVisibleException
C)
Both (A) and (B)
D)
StaleElementReferenceException

Correct Answer :   StaleElementReferenceException

A)
By class object
B)
String representation of XPath
C)
List of WebElement
D)
None of the above

Correct Answer :   List of WebElement

A)
driver.getCountOfElements()
B)
Driver.findElement(By.id("search")).getCount()
C)
Driver.findElements(By.id("search")).length()
D)
Driver.findElements(By.id("search")).size()

Correct Answer :   Driver.findElements(By.id("search")).size()

A)
Provides professional customer support
B)
Test Reports are generated automatically
C)
Comes with a built-in object repository
D)
Cannot access elements outside of the web application under test

Correct Answer :   Cannot access elements outside of the web application under test

A)
Open
B)
OpenText
C)
OpenTable
D)
OpenRecord

Correct Answer :   Open

A)
XML format
B)
HTML format
C)
DHTML format
D)
J2EE format

Correct Answer :   HTML format

A)
Selects all the siblings after the current element
B)
Selects all of the siblings before the current element
C)
Selects all elements that follow the closing tab of the current elements.
D)
Selects all elements that are before the current element

Correct Answer :   Selects all elements that follow the closing tab of the current elements.


Explanation :

Following axis is select all nodes or element that come after context node or follow the closing tab of the current element in the same document except the descendent, attribute nodes and namespace nodes.

Therefore, Option C is the correct answer.