Wednesday, 13 June 2018

Software testing Interview Questions asked in Sapiens


1. Write a selenium code to click all the checkboxes in a webpage.
2. Write a selenium code to check if a checkbox is checked or unchecked.
3. Write a java code to swap two numbers without using two variables.
4. Can we instantiate an abstract class?
5. Write a selenium code to double click on a web element.
6. Tell about your current project architecture.
7. Why do we use TestNG with selenium?
8. What is the difference between @Before Test and @Before Method in TestNG?
9. For following scenario :-

@Before Test
public void beforeTestMethod ()
{
System.out.prinln (“Before Test Method”) ;
}
@Before Method
public void a()
{
System.out.prinln (“a()”) ;
}
public void b()
{
System.out.prinln (“b()”) ;
}

How many times Before Test and Before Method gets executed?
10. What is priority in TestNG ?
11. For following scenario find out the execution sequences of these methods ?

@Priority (0)
Public void a()
{
System.out.prinln (“a()”) ;
}
@Priority (0)
Public void g()
{
System.out.prinln (“g()”) ;
}
@Priority (0)
Public void d()
{
System.out.prinln (“d()”) ;
}
@Priority (0)
Public void l()
{
System.out.prinln (“l()”) ;
}

12. Using TestNG annotations how can we make sure that a method b() gets executed only if method a() is successfully executed without any errors?
13. Write a selenium code to handle multiple windows.
14. Difference between a HashMap and a HashSet?
15. Brief description of your day to day activities as a QA Engineer.

Enjoy Interview.

No comments:

Post a Comment