Posts

Showing posts from March, 2017

ArrayList in java - Mostly used in selenium

Image
Java ArrayList class uses a dynamic array for storing the elements. It inherits AbstractList class and implements List interface. The important points about Java ArrayList class are: Java ArrayList class can contain duplicate elements. Java ArrayList class maintains insertion order. Java ArrayList class is non synchronized. Java ArrayList allows random access because array works at the index basis. In Java ArrayList class, manipulation is slow because a lot of shifting needs to be occurred if any element is removed from the array list. Hierarchy of ArrayList class As shown in above diagram, Java ArrayList class extends AbstractList class which implements List interface. The List interface extends Collection and Iterable interfaces in hierarchical order. ArrayList class declaration Let's see the declaration for java.util.ArrayList class. public   class  ArrayList<E>  extends  AbstractList<E>  impl...

Selenium Interview Question-9

) Mention what are the types of  Listeners in TestNG ? The types of Listeners in TestNG are, ·          IAnnotationTransformer ·          IAnnotationTransformer2 ·          IConfigurable ·          IConfigurationListener ·          IExecutionListener ·          IHookable ·          IInvokedMethodListener ·          IInvokedMethodListener2 ·          IMethodInterceptor ·          IReporter ·          ISuiteListener ·          ITestListener 96) Mention what is desired capability? How...

Selenium Interview Question-8

87) How do you identify an object using selenium? To identify an object using Selenium you can use isElementPresent(String locator) isElementPresent takes a locator as the argument and if found returns a Boolean 88) In Selenium what are Breakpoints and Startpoints? ·          Breakpoints:  When you implement a breakpoint in your code, the execution will stop right there. This helps you to verify that your code is working as expected. ·          Startpoints Startpoint indicates the point from where the execution should begin. Startpoint can be used when you want to run the testscript from the middle of the code or a breakpoint. 89) Mention why to choose Python over Java in Selenium? Few points that favor  Python  over Java to use with Selenium is, ·          Java programs tend to run slower compared to  Python  programs....

Selenium Interview Question-7

77) Explain what is framework and what are the frameworks available in RC? A collection of libraries and classes is known as Framework and they are helpful when testers has to automate test cases. NUnit, JUnit, TestNG, Bromine, RSpec, unittest are some of the frameworks available in RC . 78) How can we handle pop-ups in RC ? To handle pop-ups in RC , using selectWindow method, pop-up window will be selected and windowFocus method will let the control from current window to pop-up windows and perform actions according to script 79) What are the technical limitations while using Selenium RC? Apart from “same origin policy” restriction from js, Selenium is also restricted from exercising anything that is outside browser. 80) Can we use Selenium RC to drive tests on two different browsers on one operating system without Selenium Grid? Yes, it is possible when you are not using JAVA testing framework.  Instead of using Java testing framework if you ar...

Selenium Interview Question-6

67)  What if you have written your own element locator and how would you test it? To test the locator one can use “Find Button” of Selenium IDE, as you click on it, you would see on screen an element being highlighted provided your element locator is right or or else an error message will be displayed 68)  What is regular expressions? How you can use regular expressions in Selenium ? A regular expression is a special text string used for describing a search pattern. In Selenium IDE regular expression can be used with the keyword-  regexp:  as a prefix to the value and patterns needs to be included for the expected values. 69)  What are core extension ? If you want to “extend” the defualt functionality provided by Selenium Function Library , you can create a Core Extension. They are also called “User Extension”. You can even download ready-made Core Extension created by other Selenium enthusiats. 70)  How will you handle wor...