WEBLOG
Format Decimal Numbers Using Locale
If you want to create a DecimalFormat instance for a specific Locale, create a NumberFormat and cast it to a DecimalFormat. The java.text.DecimalFormat class is used to format numbers using a user specified formatting. This concrete subclass of NumberFormat, allows formatting decimal numbers via predefined patterns specified as String . It has a variety of features designed to make it...
Desired Capabilities in Selenium Web Driver
1. Desired Capabilities in Selenium The performance of a Web application may vary according to different browsers and operating systems. Hence to ship out a near-consistent functional and performant application, it calls for testing your applications against different browsers or browser configurations. That is where Selenium's 'Desired Capabilities' class comes into the picture. 'DesiredCapabilities' is a class in Selenium that can...
Format Decimal Numbers Using Pattern
The java.text.DecimalFormat class is used to format numbers using a user specified formatting. This concrete subclass of NumberFormat, allows formatting decimal numbers via predefined patterns specified as String. It has a variety of features designed to make it possible to parse and format numbers in any locale The following example shows formatting decimal numbers using various string patterns: 4c8d7923a6dcd7cdc6ac489ba6c59bdc The above code...
Java Tutorial #7 Part 1 – Classes & Objects
Classes are a very important concept in Java. Java code always needs to be written in a class. In this article, we will be taking a very close look at classes and understanding their syntax and semantics. Classes and objects A class defines a new data type. Once defined, this new type can be used to create objects of that type....
How To Use Mouse and Keyboard Events with Selenium
In this tutorial, we will discuss how to use mouse click events and keyboard events with Selenium WebDriver. The mouse click and keyboard events are used to automate the interactions of a user with a mouse and keyboard. Action & Actions We encourage the use of Action and Actions together with the keyboard and mouse events. Action & Actions are user-facing...
Java Tutorial #6 – Jump Statements
Introduction The break statement is used to stop further execution. It can be used either in a loop or within a switch statement. Break Statement The break statement is used to stop further execution. It can be used either in a loop or within a switch statement. Break in a loop When the break statement is used within a loop, it terminates the loop....
HomeWeblog
FT AUTOMATION
Essentials of Typical QTP/UFT Framework
Table of Contents Essentials 1: Test Artefacts Repository Essentials 2: Error Handling and Recovery Essentials 3: Object Identification Method Essentials...
HOW-TO'S
How To Change Apache Http & SSL Ports in XAMPP
Why change Apache Port By Default, Apache runs HTTP on port 80 and SSL on port 443 in...
NFT AUTOMATION
Getting Started with Apache JMeter
1. Introduction As a developer, you may have tested the functionality of your code hundreds of times during...
PROGRAMMING
How To Create Maven Project in Eclipse With Archetype
Maven Basics Maven automates the steps involved in building a software application like adding the JAR files, compiling...
Remove Duplicates from List Using LinkedHashSet
Another implementation of the Set interface is LinkedHashSet. LinkedHashSet maintains the order of elements and helps to overcome the HashSet limitation. The following code demonstrates this: This code is quite similar to the one seen earlier, except that it uses a LinkedHashSet. The input List is passed as a parameter to the LinkedHashSet constructor. d5e45fc48b7575762bc7c187109c7ad1 Since a LinkedHasSet is used, the...
Working with JMeter Listeners
About Listeners Listeners are used for displaying test results in JMeter. Listeners allow system engineers to analyze the responses from the testing system and monetize the request sent from JMeter. You can show the listener results in a table, tree, graph, or write into a file. These demonstrated effects consist of time details,capacity-related information, percentages, and distributions. 1. How to add...
Convert List to Array Using Stream with Param
There is an overloaded version of the Stream.toArray method which can be used to return a result array that is of the same data type as the input array. The following code demonstrates this: Firstly, the 'stream()' method is invoked on the input List which returns a Stream corresponding to the List. Then the overloaded 'toArray' method is invoked. This...
Remove Duplicates from List Using HashSet
The Set is also an interface in the 'Java Collection' framework. Unlike a List, a Set does not allow duplicates. Hence you can use a Set to eliminate the duplicates in a List. There are several ways in which you can use a Set to eliminate duplicates as demonstrated below: The most commonly used implementation of Set is HashSet....
How To Convert List To Array in Java
A common scenario faced by programmers is to convert a Java List to an Array. A 'List' is part of the Collection Framework and is useful when the number of elements are unknown. An 'Array', on the other hand, is useful for fixed-size elements. However, in real-world programming, there are often situations when you would need to convert a List...
Convert List to Array Using Stream without Param
Java 8 has added the Stream API that helps to easily perform bulk operations on Collections. A new method called stream() has been added to all the collection interfaces that returns a Stream corresponding to the underlying collection. There is a toArray method available on the Stream interface that can be used to convert the Stream to an array. So...
Remove Duplicates from List Using For-Loop
The simplest way to remove duplicates from a 'List' is to use a for-loop. The following code snippet demonstrates this method. First, the code creates a new ArrayList to store the output, i.e. a List without duplicates. A for-loop is then used which iterates through the input List. It first checks if the input element is present in the output...
CODE SNIPPETS | CODEX
Git
Common OpenSSH Commands Reference
Secure Shell, sometimes referred to as Secure Socket Shell (SSH), is a protocol which allows you to connect...
How-To VBScript
How To Write Windows Environment Variables With VBScript
This is in continuation to the last post where we saw how to read windows environment variables using...
Java Gists
Convert String to java.time.LocalDate with Formatter
The LocalDate class has an overloaded parse() method. In addition to the String Date, it accepts a DateTimeFormatter...
ÂÂ



