Monday, March 5, 2012

Interview Questions for Automation Engineers

1.Access Modifiers of JAVA
2.Explain final finaly and finalize
3.real example for abstract and interface
4.Launch firefox driver using webdriver.
ans: (driver driver = new firefox driver();)selenium selenium = new default selenium(driver,; to handle file upload using webdriver:
ans:Autoit /Sikulo\i
6.which is the plugin in ie to find d locator
ans: developer tool
7. Major difference between selenium RC and selenium Webdriver?
ans:Single origin policy 
  1.  WebDriver works at the OS/browser level:For instance, command type works at the OS level rather than changing the value of the input elements with JavaScript
  2.  It drives the browser much more effectively and over comes the limitations of Selenium 1.x which affected our functional test coverage, like the file upload or download, pop-ups and dialogs barrier or self-signed certificates problems
  3. Selenium RC, It ‘injects’ JavaScript functions into the browser when the browser was loaded and then used its JavaScript to drive the AUT within the browser. WebDriver does not use this technique. Again, it drives the browser directly using the browser’s built in support for automation.WebDriver drives the tests natively with the browser and emulates the Human interaction with website. Implementation differs on each browser’s.
  4.  Selenium 2.0 will provide both Selenium 1.x and WebDriver APIs.
  5. WebDriver is the name of the key interface against which tests should be written, but there are 11 implementing classes, listed as below:
    AndroidDriver, AndroidWebDriver, ChromeDriver, EventFiringWebDriver, FirefoxDriver,
    HtmlUnitDriver, InternetExplorerDriver, IPhoneDriver, IPhoneSimulatorDriver, RemoteWebDriver, SafariDriver.
8.what is hashmap?
9.Explain OOPS concept
10.TestNG framework.(How to pass parameters to the test method)
11. why static keyword is used in main declaration?
12.what is difference between testng paralellism and selenium grid?
13.There is a script which types abc in a text box.When we run the script on firefox,it types abc with no pause,whereas if we run it on ie, it types a pauses types b pauses,types c and pauses.Y is it so?
ans: Using css instead of xpath might resolve the issue.
14. What are the challenges faced in IE?
ans:Lazy loading.
15.Scenario: Clicking on a button opens a pop up with no title or text ,just the locator of the popup exists.How do you wait for the popup to disappear?
ans:Wait for the text to be enabled on the main page.or check if the locator of the popup is still displayed on screen
16. Scenario: Above scenario how can you handle if multi threading  is implemented.
     if(any component on the mainpage is disabled due to popup){ //pop up is available
    waitforpopupto disappear

qs: thread1 is in while(),control is given by cpu to thread2 to execute something else.until control comes back, popup might have come and disappeared .So, thread1 goes to infinite loop.

What do we do in such situation?

17. Some testcases fails due to sync issue even after providing explicit and implicit waits? how can we resolve this issue?

18.How do we re-run testcases which failed only due to sync issue in testNG?

Asked below in Amazon Interview:
19.without using inbuilt function, find the index of 1 string in other string
20.find the number is square root or not and find the sq root of any given number
30.write testcases of above to test ur code

Please provide your thoughts as comments..

How to access display function of class b in classA
if display function is static , if class a extends class B, if class A doesnt extend class B, if display function is private/protected.
Program to remove duplicates in a array.
How to disable one test method of a class.
How to make one test run,only if pre-req test passes.
How to run parallely in grid.
how to setup jenkins using ant.
knowledge on Unix?

No comments:

Post a Comment