According to name, a Properties file is used to define properties of keys which would have been used in our Selenium project. A Property file contains data in Key=Value format. It helps external users to communicate with the code and generate output on the basis of inputs. Features of a Property File: Can be usedRead More
foreach
getWindowHandle() and getWindowHandles() methods.
getWindowHandle() stores the reference of the currently active window. On the other hand, getWindowHandles() returns a list of all the opened windows associated with a particular driver instance. getWindowHandle() It basically returns an id(handle) pointing to the currently active window. The return type of this method is a String type. We can use this referenceRead More
Windows Handling | Multiple windows handling using JavascriptExecutor.
Traversing through multiple windows using ‘JavascriptExecutor’ and selecting user-defined tab window with ‘Title Partial Text’. This process is called multiple windows handling. Some times we have to open multiple windows (tabs) as per the requirement and need to switch the control through various tabs to select user definedRead More
Selenium-7 || Let’s learn to create complex XPath.
There are few scenarios where we get stuck and unable to locate web element on the page. In this blog I will discuss such scenarios. Here I have taken example of a simple Calendar widget and will learn how to get few type of dates as mentioned below: Print Current date. Use following-sibling to getRead More
Using HashMap in Java. (Collection-4)
HashMap is a class that implements the Map interface. A map stores data in the Key-Value pair. HashMap uses the same technique to store values. Class: HashMap Interface: Map Package: java.util We can never lose any data as we are tagging each element with a key in HashMap. On the other hand, while using anRead More
File Handling || Traverse folders and subfolders in Java.
As we all know that we can read or write data on any format of file whether it is excel, word, notepad. But sometimes we need to traverse folders and subfolders to locate any file. Also, sometimes we need to identify the file folder count under specific directory, find a file with specific name, findRead More
Basic Java – 15 || Runtime User Input using Scanner Class (Part-1).
Scanner Class is the commonly used way of taking user inputs. There are many instances where user interaction is needed at runtime during the Program execution. Scanner Class It can be used via java.util.Scanner library files. There is a major role of Whitespace and Enter while taking user inputs using Scanner class. These user inputsRead More
Basic Java – 11 || for and for-each in Java. (Loops Part-1)
Sometimes we need to perform a set of instruction(s) repeatedly. We have to use for and for-each statements in Java Programming. Instructions within a loop statement repeat itself until a predefined condition. For Loop Along with the key feature of, repeating a set of instruction(s)Read More