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

Select the command which is used to print a string value or a variable in Selenium IDE.

The 'display'

The 'echo'

   

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 until the specified element becomes present.

waitForElementP

waitForPagePrese

   

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 until the page is loaded completely.

waitForPageToLo

waitForElementPr

   

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 elements

verifyElementPre

verifyElementRig

verifyElementNotPre

verifyElementPosition

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 page on the browser's history in Web driver Selenium.

navigate.forward(

navigate()_forwar

   

)

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 matching the parameter passed to it

selectVisibleText(

selectByVisibleTe

   

)

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 main document when a page contains frames

alert()

default Content()

window(java.lang.Str 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

Select the Browser which is supported by Selenium IDE

Google Chrome

Internet Explorer

Firefox

Opera mini

The selenium is

Provides professional customer support

Test Reports are generated Automatically

Comes with a build-in object repository

Cannot access elements outside of the web application under test

Select the method which selects the option at the given index

selectByIndex()

selectIndex()

selectedByIndex()

selectedByIndexes()

Select the command which is not a type of assertion in Selenium IDE

Assert

Verify

WaitFor

Wait

What does the assertTitle checks

Element Title

Page Title

Block Title

Title of Element

Can Unix operating system is supported by Selenium IDE

TRUE

FALSE

   

Select the command which is used to print a string value or a variable in selenium IDE

display command

echo command

print command

printer command

The Action commands

are commands that directly interact with page elements

are commands that allow you to store values to variables

are commands that verify if a certain condition is met

are commands that allow you to print values of the variables

Which commands can be used to enter values onto text boxes?

sendskeys()

sendkey()

sendkeys()

sendskey()

Select the command which is used to compare the contents of a table with expected values

verifyTables

verifyTableData

verifyTable

verifyTableCell

Which component is used to run multiple tests simultaneously in different browsers and platforms?

Selenium Grid

Selenium IDE

Selenium RC

Selenium Webdriver

Select the Get command which fetches the inner text of the element that you specify in wed driver

getInnerText()

getText()

getTextelement()

getElementText()

How to maximize the browser in selenium web driver

driver().manage().maximize()

driver().manage().window().maximize()

driver().window().maximize()

manage().window().maximize()

Select the method which clears all selected entries in web driver selenium

deseselectAll()

Clear()

dselectAll()

deselect()

Which is NOT a wait command

waitForTitle()

waitForTextPresent()

waitForActive

waitForAlert

select the method that performs right click at the current mouse location

right.click()

context.click()

contextClick()

click.Context()

How to execute a specific command

Highlight a command and press Ctrl +F9

Highlight a command and press Alt +F9

Highlight a command and press Ctrl +X

Highlight a command and press X

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()

Which WebDriver method is used to change focus to an alert, a frame or a browser window?

changeTo()

switchTo()

changeFocus()

switch()

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

The Selenium RC is used

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

To create tests with little or no prior knowledge in programming

To test a web application against Firefox only.

To run a huge test suite, that can be executed on multiple machines.

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

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

waitForPageToLoad

waitForElementPresent

waitForPage

waitForLoad

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 in Web driver Selenium.

By.cssSelected

By.cssSelection

By.cssSelector

By.Selectcs

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 do something like hold down a key and move the mouse around or carry on typing,

Interactio

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

Selenium IDE can be used

customized test

multiple

HTMLUni

webapplica

environme

tions in

results

nts using

t

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

Does selenium support Datadriven framework

Yes

Only

Modular

Framework

No

keyword

driven

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 element at Rootnode in the XML document.

TRUE

FALSE

   
 

It needs to stop at the first element that it finds

This is

The path of the file or folder

All of the above

The // tells the query that

comment

     

Working

 

Applications do not have the items needed for the tests when the tests get to commands. To get around this, we had a look at adding from waitFor commands to test. This is related to

Debugging test

Working

with AJAX

application

with

multiple

windows

All of the above

     

wait for

None of

Which is a procedure?

wait

exit

property

these

     

The first

 

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

paramete

r

is where

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

it

was

used, and

To delete a cookie we need to call the deleteCookie method, passing in two parameters.

the

second

None of

these

paramete

 

r

is where

it

was

created

 

//div[contains(@id,'

     

If you wanted to access the element that has the text "This element has an ID that changes every time the page is loaded" in it, then which of the following is used?

time_')

//div[contai

ns(@id_tim

e())

//div[par

ameter(

@id_time

())

//div[para

meter(@id,

’time_’)

   

Selects all elements that follow the closing tab of the current elements

Selects all

 

In Selenium, Following Axis is related to:

Selects all the siblings after the current element

of the

siblings

before

the

Selects all

elements

that are

before the

current

current

element

element

While working with files, we need to handle the Checked Exception in our code, othe

TRUE

FALSE

   

Whats the abbreviation for DOM?

Dynamic Object

Model

Document

Object

Data

Object

Document

flow Object

Model

Model

Model

   

storedvars['

   

variable can be saved in which of the following formats?

${variableName}

variableNa

me']

Both of

these

None of

these

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 from one page to another

waiting for

 

wait till the element is

 

the page

Every 2

what are the situation we can consider for Selenium webdriver wait

title

secs

displayed

     

titleConta

   

titles(java.l

ins(java.lo

The Expected conditions class contains the set of predefined conditions to be used with webdriver wait are

elementToBeClickab le(By Locator)

ong.String

ng.String

textPresent

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 returns successfully

milliseconds until it

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

     
 

NoSuchElementExc

NoSuchFra

NoSuchC

ontextExc

NoAlertPre

TimeOut

eption

meExceptio

eption

sentExcepti

Exceptio

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 are

     

WSSFWork

 

Workbook

Sheet

Cell

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 = wb.getShee t()

=

Sheet sh =

wb.getSh

None of

How to get the access to the sheet 1 in a particular workbook in excel

wb.getSheet(1)

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

 

Finally block

Catch block

Try 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 scripts in the background.

 

Firefox driver

Html unit

Phantom

Webdriver

Both b &

driver

js

driver

c

     

HTML

   

Advantage of

Testng

 

Grouping Test cases

Parrllel

report

Test case

All the

testing

generatio

priorty

above

   

n

     

Tests

Test

 

What is TDD

Test driven

devlopment

Test data

devlopmen

t

data

devlopme

directory

devlopmen

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

m

A&B

B&C

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()

wNum()

getnum()

   

Before

Before

 

All THE

Which of the following are annotations in Testng

 

Before class

suite

test

After test

above

     

Maximum

Low cost

Easy

All THE

Advantage of Automation framework

Reusability of code

coverage

maintena

reporting

above

 

nce

Which is the attribute to run script multiple times IN Testng

 

Count

Run count

Invocatio

Multiple

 

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;

;

How will you select dropdown value

Select by Value

Select by

Select by

Visible

All the

index

above

   

Text

     

Dependso

Execution

If I want to run the 3rd @Test first, how to achieve that use @

Priority

Dependson

methods

ngroups

order

   

Prepared

Callable

All the

which is the jdbc statements

Statement

statement

statemen

above

t

Grid is used to achieve remote execution.

TRUE

FALSE