Monday, September 21, 2015

Unknown questions in Selenium


Source: http://www.brainmeasures.com/e_notes_and_certification.aspx

- Finding an element ending with specific letter, how do you write the xpath or regular exp in selenium??

Try: Use of Contains method: 
xpath("//<nearest tag name>@contains(<attribute>,"text"))



- What is Selenium 2

- Selenium has an ____________ that allows us to fire the event that is attached to elements on a page.

- The Default Selenium object takes _________parameters in its constructor.

- The command runs the snippet within the Selenium object.
http://www.seleniumwiki.com/selenium-rc/example-of-store-storeeval-and-geteval-in-selenium/

- To initialize the Selenium object how many parameters it will take

- What is the annotation we put above our setUp() to make sure we pass in the browser?


- If you wanted to validate that a button, which has appeared, is on a page, what two commands would be the best to use?

a) Verify Text Present/assert Text Present
b) Verify Element Present/assert Element Present
c) Verify Alert Present/assert Alert Present
d) Verify Alert/assert Alert

- What is the node inside the node that allows us to specify the browser?

a) Limit
b) Bound
c) Constraint
d) Parameter

- ________Finds the item ending with the value passed in. This is the equivalent to the X Path ends-with.

a) &=
b) *=
c) ^=
d) $=

-
Are you still required to use Browserbot in your JavaScript?

- Selenium cannot always type into --------------------------------- areas.
a) Content Editable
b) Content Erasable
c) Content Writable
d) None of the above

- When we wanted to find if there was text with Cap on the page, we put a _______ at the start and end of the pattern.

a) #
b) /
c) *
d) &


- Selenium and are being merged to create the new Selenium 2 code framework.

a) remoteWebDriver
b) webtesting
c) webDrives
d) webDriver


- What is the desktop viewing application Castro relies on?

a) VCG
b) VRC
c) VNC
d) VNG

- _______________ are used extensively throughout Selenium as the default pattern matching technique.

a) Globbing
b) Expressions
c) Globs
d) Characters

- What is the name of the library we used to record video?

a) Citrine
b) Castro
c) Castrate
d) None of the above


- To find an element by ID in a CSS selector, we need to place a _____________ in front of the ID of the element in the CSS selector.

a) !
b) #
c) $
d) *


- __________________is a way to wrap up the Window object within Selenium that Firefox adds and only allows access to very basic DOM calls.

a) XPC Native Wrapped
b) XPC Native Wrapper
c) XPM Nate Wrap
d) XPN Nate Wrap


- What class do we need to extend when writing JUnit 3 style tests?

a) Selenium Test Case
b) Selenese Test Case
c) Seleneum Test Care
d) Selenium IDE tests


- Which command is used to get the string?

a) StoreVariable command
b) StoreData command
c) StoreText command
d) StoreRecord command


- Selenium and are being merged to create the new Selenium 2 code framework.

a) remoteWebDriver
b) webtesting
c) webDrives
d) webDriver


- How do you start the browser?

a) Call the execute() function
b) Call the run() function
c) Call the proceed() function
d) Call the start() function


- The_________ node in the TestNG configuration file also stores which test classes these parameters are going to be used in.

a) <test>
b) <check>
c) <analysis>
d) <trial>


- From which method we can stop the browser?

a) exit () method
b) stop() method
c) pause() method
d) end() method


- How would you get all the cookies that are on the page?

a) acquireCookie()
b) obtainCookie()
c) getCookie()
d) catchCookie()


- The one window will hold the_____________ with the Test Suite on the left-hand side.

a) Selenium Code Framework
b) Selenium Core Framework
c) Selenium Framework
d) Selenium Core


- ____________ file that contains all the configurations that Selenium grid has.

a) YACL
b) YANL
c) YAML
d) YAPL


- How many Mechanisms are for validating elements that are available on the application under test?

a) 3
b) 4
c) 2
d) 5


-
If we want to access the DOM in your test without using a specific Selenium command, you will need to access it through this special object. This object is called __________?

a) DOM access
b) browser access
c) browserboat
d) browserbot


- How do you store variables to be used later in the test?

a) Use the storedVars dictionary
b) Create a new variable that has global scope
c) You cannot store variables using user extensions
d) You can store variables using user extensions

- How do you specify the port the Remote Control is running on?

a) Dport=portSeries
b) Dport=portNumber
c) Dport=port
d) Dport=portCount

- What is the command required to start the Hub?

a) ant launch-network
b) ant launch –hub
c) ant launch-caption
d) None of the above

Handling Cookies

Selenium 1 vs Selenium 2