Posts

Showing posts from September, 2020

What is Selenium WebDriver?

Image
  What is selenium? Selenium is an open-source automated testing framework which is used to validate web applications across different browsers and platforms. We can use multiple programming languages like java, c#, python to create test scripts. What is WebDriver? WebDriver is a bunch of API (Application programming interface) for DOM (Document Object Model) interaction and Browser control. How to download selenium webdriver? Selenium installation is a 3 step process: Install Java SDK Install Eclipse Install Selenium Driver File Open the below link https://www.selenium.dev/downloads/ Go to the Selenium Client & WebDriver Language Bindings section. Choose your convenient language & clicks on Download link This download comes as a ZIP file named "selenium-3.14.0.zip". Configure Eclipse IDE with Webdriver Launch the "eclipse.exe" file inside the "eclipse" folder When asked to select for a workspace, just accept the default location. Create a ne...

iii) Java Basics for Selenium (static and non-static concept)

Image
Static Variable: Static variable in Java is a variable that belongs to the class and initialized only once at the start of the execution. It is a variable that belongs to the class and not to object(instance ). Static variables occupy the memory when program execution starts. Example.,  static int i; Static Method: Static method in Java is a method which belongs to the class and not to the object. A static method can access only static data. A static method can call only other static methods and can not call a non-static method from it. A static method can be accessed directly by the class name and doesn’t need any object Example., public static void function_name( ){ } Non Static Variable: A non-static variable does ot have the keyword static before the name of the variable. Any variable of a class which is not static is called a non-static variable or an instance variable. Non-static variable occupies the memory when necessary and after use releases the memory. Example.,...

ii) Java Basics for Selenium (Array)

Image
  Array: Java array is an object which contains elements of a similar data type. Additionally, The elements of an array are stored in a contiguous memory location. It is a data structure where we store similar elements. We can store only a fixed set of elements in a Java array. One dimensional Two dimensional Object array  One dimensional array: Declaration Syntax :  int j[ ]; // Declaring array j= new int[5]; //Allocating memory to array   Or int[ ] j = new int[5]; // Combining both statement in one Example ,  class OnedimensionalStandard { public static void main(String args[]) {     int[ ] Mydata = new int[3]; Mydata[0] = 10; Mydata[1] = 20; Mydata[2] = 30; //printing array   for(int i = 0; i<Mydata.length; i++) { System.out.println("One dimensional array elements are");        System.out.println(a[i]);    }  } }      2. Two-dimensional array Declarat...