Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Selenium-1

Total questions: 11

Worksheet time: 22mins

Name
Class
Date
1.

Which method should we use to launch a url?

a)

openUrl()

b)

get()

c)

startChrome()

d)

open()

2.

which method to use to get an element from webpage?

a)

findElements()

b)

searchElement()

c)

getElement()

d)

findElement()

3.

Which is the correct syntax of DOM?

a)

<tag attr1=value1, attr2=value2>Text</tag>

b)

</tag attr1=value1, attr2=value2>Text</tag>

c)

$tag attr1=value1, attr2=value2$Text$/tag$

d)

<tag attr1==value1, attr2==value2>Text</tag>

4.

What does DOM stands for?

a)

Discover Object Mechanism

b)

Document Object Model

c)

Data Object Matrix

d)

Desktop Object Model

5.

Which of the below file we use in Maven project?

a)

com.xml

b)

pom.doc

c)

poc.xml

d)

pom.xml

6.

Which of below is NOT a webelement type

a)

Check Box

b)

DropDown

c)

Selector

d)

Radio button

7.

Which method to use to close a webpage?

Hint : more than one answers are correct.

a)

quit()

b)

shut()

c)

close()

d)

disconnect()

8.

Which of the below are NOT a correct way of location element?

Hint : More than one answers are correct.

a)

By.id

b)

By.div

c)

By.classname

d)

By.linktext

e)

By.partialtext

9.

Method to get title of the page

a)

getPageTitle()

b)

getTitle()

c)

fetchTitle()

d)

getWebTitle()

10.

Which method to use to get current page url?

a)

getUrl()

b)

getCurrentUrl()

c)

getPageUrl()

d)

getWebpageUrl()

11.

Difference between quit() and close()?

a)

quit() method quits the active window only, close() method closes the active window

b)

quit() method quits the active window only, close() method closes all opened windows.

c)

quit() method quits all opened windows, close() method closes the active window only.

d)

quit() method closes all opened windows, close() method opens a browser session