Skip to main content

Posts

Showing posts from July 13, 2019

How to define DRIVER.MANAGE().WINDOW().MAXIMIZE() ?

What  is DRIVER.MANAGE().WINDOW().MAXIMIZE() ? Now we explain why do we write syntax as below: driver.manage().window().maximize(); // To maxmize driver.navigate().to("some url"); // To open url driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);// To set implicit time Actually it’s JAVA concept. It is called as method chaining. We will learn about this now. Some basic Concepts of JAVA: 1. There can be two types of members in a java class. Static and Non-static. 2. Static methods can be called using class name or by creating an object of that class but calling by class name is perfect practice. 3. Non-static members of class can be called only through object of class. 4. A method can return a type. It may be class or interface as well. #JAVACODE to learn how to call static and non-static methods: public class Demo {  void NonStaticMethod()  {   System.out.println("Non static method");  }  static ...

What's the meaning of System.out.println in Java?

What's System.out.println in Java? System.out.println is a statement that prints the argument passed, into the  System.out  which is generally stdout. System is a Class out is a Variable println() is a method System is a class in the  java.lang package  . The out is a static member of the System class, and is an instance of  java.io.PrintStream  . The println is a method of java.io.PrintStream. This method is overloaded to print message to output destination, which is typically a console or file. the System class belongs to java.lang package class System {   public static final PrintStream out;   //... } the Prinstream class belongs to java.io package class PrintStream{   public void println();   //... }