Monday, May 15, 2017

Selenium

I. Selenium IDE

1. what kind of app is the selenium IDE?
- Firefox add-on
2. A selenium IDE testcase has 3 columns, command, target and value. what data is stored in the target column?
- element or location where the command is executed
3. By default, in which format does the selenium IDE save a test case?
- as HTML
4. what features are available in selenium IDE to debug an automated test case?
all:
- toggle Breakpoint
- pause/ resume
- step
5. what is the selenium print command?
- Echo
6. what urls does the selenium open command allow?
any
- only the base url
- any url relative to the base url
- any absolute url
7. what is the correct syntax to access the value of a selenium variable called name?
- ${name}
8. what is the difference between assert and verify cammands?
all
- assert commands are more uncommon than verify commands
- typically, an assert command is followed by verify command?
- a failed assert command stops the test but a failed verify command does not do so.
9. in which associative array does selenium store of a test case's variables and their respective values?
- storedVars
10. where can you create your own selenium command?
- in any javascript file, but the preferred name is user-extensions.js for consistency

II. Selenium RC

1. Select the component which is NOT part of selenium suite
- selenium web
2.what is data parameterization?
-using variable test data in place of fixes test data values
3. select the operating system which is NOT supported by selenium IDE
- unix
4. the selenium can
- only test web apps
5. which command can be used to enter values on text boxes?
- sendKeys()
6. select the command in selenium IDe used to open a pagusing the url
- open
7. how do you start the browser?
- selenium.Start()
8. which component is used to run multiple tests simultaneously in different browser and platform?
- selenium GRID
9. which of the following is an incorrect target for pattern matching as in verifyTextPresent command?
-exact:*Sumary
10. which of the following always need a capital letter?
- class names and Strings

III.Selenium commands "Selenes"

1. what are the different modes that selenium uses?
all
- 1
- *firefox and *iexplore
- *chrome
2. how do you start browser?
- selenium.Start()
3. select the browser which is supported by selenium IDE
- Mozilla firefox
4. how many parameters does the selenium object take when using DefaultSelenium?
- 4
5. how do you start selenium RC server with user extensions?
- java -jar selenium-server.jar-user Extensions user-extensions.js
6. which selenium command do you use to run commands in slow motion in selenium RC?
- selenium.setSpeed()
7. which command is used to get the alert box?
- selenium.getAlert()
8. which command is used to for verifying if web element exists?
- selenium.isElementPresent(String locator)
9. which command is used for tying in a textbox?
- selenium.type(String locator, String value)
10.what is the command to load a page?
- selenium.waitForPageToLoad(String timeoutInMilliseconds)

IV. Selenium to a program

1. how to you xpath for dynamic elements?
- identify the pattern and modify xpath pattern
2. Is regular expression helps to identify dynamic elements?
- Not very compatible
3. How to check if any check box is checked or not?
- driver.findElement(By.id(<>).isSelected()
4. What is getWindowHandle method?
- Method will help to handle of opened windows other than parent
5. How to handle alert using selenium?
- Driver.swithcho.alert()
6. What is Iterator?
all
- Iterator enables you to cycle through a collection, obtaining or re...
- It basically starts at the beginning of a collection
- When you want to know which things are in a certain collection, you...
7. After the poup actions, how to switch the driver back to the parent window?
- browser.switchTo().window(parentWindowHandle);
8. A constructor
- is used to create objects
9. Which declaration of the main method below would allow a class to be started as a standalone program. Select the one correct answer
- public static void main(String args[])
10. Native methods can be 'abstrct'
- false

V.Selenium Webdriver

1. in webdriver, which method closes the open browser?
- close()
2. In web driver, which of the following is a valid select statement that selects a value from a drop down element?
all
- selectByIndex()
- selectByVisibleText()
- selectByValue()
3. Which webdriver method is used to change focus to an alert, a frame or a browser window?
- switchTo()
4. In Webdriver, which methods navigates a URL?
- get(\url\")"
5. In  webdriver, which command takes ou forward by one page on the browser history?
- navigate().forward()
6. In webdriver, which command can be used to enter values onto text boxes?
- sendKeys(\text\")"
7. In webdriver, which is the method that counts the number of elements?
- driver.findElements(By.id(\search\")).size()"
8. In webdriver, which of the following commands retrieves the text of a html element?
- getText()
9. What funtionality does Webdriver support on browser cookies?
any
- add and delete an individual cookie
- delete all cookies
10. Which of these Webdriver interface methods is used to open a URL in the browser?
any
- Get
- navigate().to

VI. Junit

VII. TestNG

No comments:

Post a Comment