Вы находитесь на странице: 1из 9

Select the command which is used to print a string value The 'display' The 'echo'

or a variable in Selenium IDE. command command The 'print' command The 'printr' command
Select the command which is used to compare the
contents of a table with expected values. verifyTables verifyTableData verifyTable verifyTableCell

Select the command which is used to pause execution waitForElementP waitForPagePrese


until the specified element becomes present. resent nt waitForTablePresent waitForFieldPresent

Select the command that will NOT wait for a new page to
load before moving onto the next command. clickAndWait selectAndType typeAndWait selectAndWait

Select the command which is used to pause execution waitForPageToLo waitForElementPr


until the page is loaded completely. ad esent waitForPage waitForLoad
Select the command which is used to compare the actual
page title with an expected value. verifyTitle verifiedTitle verifyTitles verifiedTitles

Select the command which is NOT used in verifying page verifyElementPre verifyElementRig verifyElementNotPre verifyElementPosition
elements sent ht sent Left
Select the variation which finds elements based on the
driver's underlying CSS selector engine in Web driver
Selenium. By.cssSelected By.cssSelection By.cssSelector By.Selectcs
Select the variation which locates elements by the value
of their "id" attribute in Web Driver Selenium By.id By.idno By.id_no By.tag_id

Which Navigate command takes you forward by one navigate.forward( navigate()_forwar


page on the browser's history in Web driver Selenium. ) d() navigate_forword() navigate().forward()

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 is_Selected() isSelect() is_Select() isSelected()

Which Component is used to run multiple tests


simultaneously in different browsers and platforms? Selenium Grid Selenium IDE Selenium RC Selenium Webdriver
Select the method which clears all selected entries in
Web driver Selenium. dselectAll() deselect_All() dselect_All() deselectAll()

Method which selects the option which displays the text selectVisibleText( selectByVisibleTe
matching the parameter passed to it ) xt() select_VisibleText() select_ByVisibleText()
waitForTextPrese
Out of the following which is NOT a wait command. waitForTitle nt waitForActive waitForAlert

Select the command which retrieves the alert message


and stores it in a variable that you will specify. storeAlert storedAlert store_Alert storesAlert
Which type of verify or assert method is used for
presence of an HTML element ElementPresent PresentElement Element present
Which validating element of selenium stops test
execution, if not available Url Locator Verify Assert
The echo command gives it’s output to Screen LogFile Printer Browser
What easily identifies an element DOM Css Selector Attribute ID
Test case export cannot be done to which programming
language in Selenium 1.7 Phython C# PHP Ruby
Which programming language is not present in selenium
core for making webscript drivers ? Java Phython C# C

What is called that scale for large test suites or test


suites that must be run in multiple environments? Selenium IDE Selenium Grid selenium web driver Selenium NG
What is a test suite made of ? Test Packs Tests Test blocks Test Pattern
What is the default port used by Selenium RC or
Selenium server for communication 8080 4444 8000 8040

Which option is given to selenium server for diagnostics debug step diagnose None of the above
What is the unit of movementsString argument in
dragAndDrop selenium action Inches Pixels cm percentage
What is the option given to selenium server during
startup for loading JavaScript file Load Extensions userExtensions loadFile
Which prototype need to be extended to create our own
function to locate an element LocateBot SearchBot PageBot WebPageBot
HTML Unit Driver is Graphical so we can watch whats
happening in the screen TRUE FALSE
Test cant be executed against emulators and real devices
for Iphone and Android OS. TRUE FALSE
Void Close Quits this driver ,closing every associated
window TRUE FALSE

Which selects either the first frame on the page or the window(java.lang.Str
main document when a page contains frames alert() default Content() ing nameOrHandle) to(java.lang.String url)

KeyBoard Simulations can be done with the help of? KEYS Sendkeys gettext getattribute
which is triggered from the application can be handled
by Assertion activation Abort Alert
Which is a commercial package allowing native calls from
javacode Shelltraywnd Windowactive Jinvoke Windowname

An implicit wait is to tell WebDriver to poll the DOM for a


certain amount of time when trying to find an element
or elements if they are not immediately available Explicit wait Implicit wait Sleep Threadsleep

WebDriverWait by default calls the ExpectedCondition


every 500 milliseconds until it returns successfully TRUE FALSE
Which of the following should be used to run your test
against multiple versions of browser and browsers
running on different operating systems WebDriver RC IDE GRID
Which runs the browser and executes the selenium
commands within that browser against the application
under test hub node Driver RC
Google Chrome Internet Explorer Firefox Opera mini
Select the Browser which is supported by Selenium IDE
Provides professional Test Reports are generated Comes with a build-in object Cannot access elements outside of
customer support Automatically repository the web application under test

The selenium is
selectByIndex() selectIndex() selectedByIndex() selectedByIndexes()
Select the method which selects the option at the given index
Assert Verify WaitFor Wait
Select the command which is not a type of assertion in Selenium IDE
Element Title Page Title Block Title Title of Element
What does the assertTitle checks
Can Unix operating system is supported by Selenium IDE TRUE FALSE
display command echo command print command printer command
Select the command which is used to print a string value or a variable in selenium IDE
are commands that directly are commands that allow you to store are commands that verify if a are commands that allow you to
interact with page elements values to variables certain condition is met print values of the variables
The Action commands
sendskeys() sendkey() sendkeys() sendskey()
Which commands can be used to enter values onto text boxes?
verifyTables verifyTableData verifyTable verifyTableCell
Select the command which is used to compare the contents of a table with expected values
Selenium Grid Selenium IDE Selenium RC Selenium Webdriver
Which component is used to run multiple tests simultaneously in different browsers and
platforms?
Select the Get command which fetches the inner text of the element that you specify in wed getInnerText() getText() getTextelement() getElementText()
driver
driver().manage().maximize() driver().manage().window().maximize() driver().window().maximize() manage().window().maximize()

How to maximize the browser in selenium web driver


deseselectAll() Clear() dselectAll() deselect()
Select the method which clears all selected entries in web driver selenium
waitForTitle() waitForTextPresent() waitForActive waitForAlert

Which is NOT a wait command


right.click() context.click() contextClick() click.Context()
select the method that performs right click at the current mouse location
Highlight a command and Highlight a command and press Alt +F9 Highlight a command and Highlight a command and press X
press Ctrl +F9 press Ctrl +X

How to execute a specific command


What is default port number used by hub in selenium? 1111 2222 3333 4444
driver.getCountOfElements() driver.findElement(By.id("search")).getC driver.findElements(By.id("sea driver.findElements(By.id("search")
In webdriver, what is the method that counts the number of elements? ount() rch")).size( ).length()
changeTo() switchTo() changeFocus() switch()
Which WebDriver method is used to change focus to an alert, a frame or a browser window?
In webdriver, which method closes the open browser?  quit() terminate() shutdown() close()
In webdriver, which methods navigates to a URL?  goToUrl("url") navigate.to("url") getUrl("url") get("url")
Select the operating system which is NOT supported by Selenium IDE. Unix Linux Windows Solaris
To run your test against To create tests with little or no prior To test a web application To run a huge test suite, that can
different browsers (except knowledge in programming against Firefox only. be executed on multiple machines.
HtmlUnit) on different
The Selenium RC is used operating systems.
Select the language which is NOT supported by the Selenium RC. ASP Java C# PHP
In case of Selenium IDE, the Source view shows your script in DHTML format J2EE format XML format HTML format.
Select the command which is used to check the presence of a certain element. verifyTable verifyTitlePresent verifyTextPresent verifyElementPresent
waitForPageToLoad waitForElementPresent waitForPage waitForLoad
Select the command which is used to pause execution until the page is loaded completely.
Select the command which is NOT used in verifying page elements . verifyElementPresent verifyElementRight verifyElementNotPresent verifyElementPositionLeft
What is TestNG? TestNextGeneration TestNewGenerlization TestNewGeneration TestNextGenerations
Select the variation which finds elements based on the driver's underlying CSS selector engine By.cssSelected By.cssSelection By.cssSelector By.Selectcs
in Web driver Selenium.
SeleniumWeb driver executes faster than Selenium RC? TRUE FALSE
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 is_Selected() isSelect() isSelected() is_Select()

In selenium, parent and child nodes are in same query because HTML has a tree structure. TRUE FALSE
Which process use the JavaScript to find an element? By DOM query BY XPath query BY CSS sector - All of these
Does Selenium supports Data Driven Framework ? TRUE FALSE
The annotation ______ identifies that a method is a test method. @Before @Test @Ignore @After
Which selenium command check whether specific text exists somewhere on the page? verifyTextPresent verifyPresentText None of these CheckTextPresent
Selenium variables are stored in _____________. VariablesStore storedVariables storedVars None of the above

The term AJAX expands to___________ Asynchronous java and XML Asynchronous javascript and XML Accumulated java and XML None of the above
What is called that scale for large test suites or test suites that must be run in multiple
environments? Selenium Grid Selenium IDE selenium web driver selenium RC
Can google chrome is supported by Selenium IDE TRUE FALSE
Select the command in Selenium IDE used to open a page using the URL OpenURL Open openText OpenRecord
Which component of selenium can create customized test results Selenium WebDriver Selenium IDE Selenium RC Selenium Grid
Select the command which is used to pause execution until the specified elements became
active waitForElementPresent waitForPagepresent waitForFieldPresent wait
css=tag:attributes("inner
Select the syntax to locate an element using inner text css=tag:contains("inner text") css=tag:value("inner text") text") css=tag:class("inner text")

Select the tab which gives feedback and other useful information when executing tests Information Feedback Reference Elements
Select the tab that shows selenium IDE command is currently executing VariablesStore Data Information info
Select the command which retrieves the alert messages and stores it in a variable that you will
specify store Alert storedAlert storesAlert stores.Alert
Advanced
User
Which allows the user to do things like dragging and dropping as well as gives us the ability to Interactio
do something like hold down a key and move the mouse around or carry on typing, Hub API ns API Java API
Advanced User Interactions API works only on MAC Unix Linux Windows
User
Registratio Page
Which are representation of web Objects Page Objects n Elements Page nodes
Waits are not used While navigating from one page to another? TRUE FALSE
The default wait for an implicit wait is not zero TRUE FALSE

A pure
JAVA
solution
and so it is Fastest
platform implement
independe Supports ation of
Benefits of HTMLUnit Driver Supports POI nt Javascript WebDriver
Confirmatio
What are the types of alerts Simple n Accept Prompt

The methods used by alert interface are accept() dismiss() gettext() sendkeys()
changeFocus() is the WebDriver method is used to change focus to an alert, a frame or a
browser window? TRUE FALSE
Consider the following code
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.presenceOfElementLocated(by));
This is an example of an implicit wait. TRUE FALSE
Selenium Selenium Selenium
Select the component which is NOT a part of selenium suite Selenium IDE
RC Grid Web
To deploy
the test
across To test
To create To test
multiple webapplica
Selenium IDE can be used customized test HTMLUni
environme tions in
results t
nts using firefox only
selenium
grid
Verifyprese None of checktextpr
Specify the selenium command which checks specific text exists somewhere on the page Verifytext present
nttext these esent
Only
Only
keyword
Does selenium support Datadriven framework Yes Modular No
driven
Framework
framework

Which will execute method before each test @after @before @test @afterclass
character
String in Java is a? class object variable
array
Which of these method of String class is used to obtain character at specified index? char() Charat() charAt() charat()
None of
Which of these keywords is used to refer to member of base class from a sub class? upper super base
these
Which of these method of String class can be used to test to strings for equality? isequal() isequals() equal() equals()
The start of Xpath instructs XPath engine to look for element starting from Rootnode Anywhere Directory File
A double slash at the start of Xpath instructs XPath engine to search look for matching
TRUE FALSE
element at Rootnode in the XML document.
It needs to stop at The path
This is All of the
The // tells the query that the first element of the file
comment above
that it finds or folder

Working
Working
Applications do not have the items needed for the tests when the tests get to commands. To with All of the
Debugging test with AJAX
get around this, we had a look at adding from waitFor commands to test. This is related to multiple above
application
windows
wait for None of
Which is a procedure? wait exit
property these
The first
The first
paramete
parameter
r is where
The first parameter is where it
it was
is the name of the was
used, and
cookie, and the created, None of
To delete a cookie we need to call the deleteCookie method, passing in two parameters. the
second parameter is and the these
second
where it was second
paramete
created. parameter
r is where
is the name
it was
of cookie.
created
//div[contains(@id,'
//div[par
time_') //div[contai //div[para
If you wanted to access the element that has the text "This element has an ID that changes ameter(
ns(@id_tim meter(@id,
every time the page is loaded" in it, then which of the following is used? @id_time
e()) ’time_’)
())

Selects all Selects all


Selects all
elements of the
elements
Selects all the that follow siblings
that are
In Selenium, Following Axis is related to: siblings after the the closing before
before the
current element tab of the the
current
current current
element
elements element
While working with files, we need to handle the Checked Exception in our code, otherTRUE FALSE
Document Data Document
Dynamic Object
Whats the abbreviation for DOM? Object Object flow Object
Model
Model Model Model
storedvars['
Both of None of
variable can be saved in which of the following formats? ${variableName} variableNa
these these
me']
In Selenium webdriver Wait is having the automated task execution elapse a certain amount
of time before continuing with the next step.
TRUE FALSE
The default setting for Implicit Wait is
1 10 0 5
An Implicit waits is code you define to wait for a certain condition to occur before proceeding
further in the code TRUE FALSE

While navigating waiting for wait till the


from one page to the page Every 2 element is
what are the situation we can consider for Selenium webdriver wait another title secs displayed

titleConta
titles(java.l ins(java.lo
The Expected conditions class contains the set of predefined conditions to be used with elementToBeClickab ong.String ng.String textPresent
webdriver wait are ______________ le(By Locator) titles) titles) (By locator)
ElementToBeClickable(By Locator) is an expected wait condition to check that only radio
buttons are visible to be clicked TRUE FALSE
textToBePresentInElement (By Locator,java.long.String text) An Expectation for checking if
the given text is present in the specified element. TRUE FALSE
WebDriverWait by default calls the ExpectedCondition every ________ milliseconds until it
returns successfully 1000 100 10 500

StaleElementReferenceException occurs when driver is trying to perform action on the


element which is no longer exists or not valid TRUE FALSE
NoSuchC
NoSuchFra NoAlertPre TimeOut
NoSuchElementExc ontextExc
meExceptio sentExcepti Exceptio
eption eption
what are the sub classes for NotFoundException Class which extends 'WebDriverException n on n
When ever driver is Unable to navigate to frame with element, it throws
NoSuchWindowException TRUE FALSE
To read or write an Excel, We need to use Apache POI that has has different Interfaces which WSSFWork
Workbook Sheet Cell
are ________ book Row

Data driven testing, which allows you to automatically run a test case multiple times with
different input and validation values,is not possible with selenium webdriver TRUE FALSE
Sheet sh
Sheet sh = =
Sheet sh = wb.getShee wb.getSh None of
How to get the access to the sheet 1 in a particular workbook in excel wb.getSheet(1) t() eet(0) the above
getMessag
________method returns a text message describing the exception name and description printStackTrace() e() toText() toString()

Using wrapper methods we can make error handling more generic in Selenium webdriver TRUE FALSE
If we use Wrapper classes in Selenium webdriver, it increases the lines of codes and a lot of
unnecessary codes
TRUE FALSE
Exception Handling Wrapper
We can increase the code reusability in selenium webdriver using _______classes Class String Class Class All of the above
None of
_________ is a block which executes whether exception raises or not Catch block Try block
Finally block the above
User defined exceptions need to be extended by Runtime Exception in our classes for
selenium webdriver. TRUE FALSE
Which driver is used to run Html unit Phantom Both b &
Firefox driver Webdriver
scripts in the background. driver js driver c
HTML
Parrllel report Test case All the
Advantage of Testng Grouping Test cases
testing generatio priorty above
n
Tests Test
Test data
Test driven data directory
What is TDD devlopmen
devlopment devlopme devlopmen
t
nt t
Doublecli Clickandhol All the
What are the mouse movements in action class Release Click
ck d above
What is the jar required for excel (xlsx) XSSF HSSF XSFF FSXF
Keybotto
What are the keyboard events in action class Keyup KeyDown A&B B&C
m
To perform keyboard and mouse actions. Actions should end with build().perform() perform() build() Relase()
getLastRo
Which method is used to get lastrow number getLastrow() getrow() getnum()
wNum()
Before Before All THE
Which of the following are annotations in Testng Before class After test
suite test above
Low cost
Maximum Easy All THE
Advantage of Automation framework Reusability of code maintena
coverage reporting above
nce
Invocatio Multiple
Which is the attribute to run script multiple times IN Testng Count Run count
n Count count
How Many times @Before suite will be executed One Two Three Four
For handling Excel what jar is used Apache poi Jxl A and B none
s.getOption s.getOpti s.getOption
How will you select the last option in the dropdown s.getOptions();
(); ons; ;
Select by
Select by All the
How will you select dropdown value Select by Value Visible
index above
Text
Dependso Execution
If I want to run the 3rd @Test first, how to achieve that use @ Priority Dependson
ngroups order
methods
Callable
Prepared All the
which is the jdbc statements Statement statemen
statement above
t
Grid is used to achieve remote execution. TRUE FALSE

Вам также может понравиться