WEBLOG

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 instance that specifies the format of the input date. So, this can be used in case the String date is not in the yyyy-MM-dd format. The following code demonstrates this: The following code demonstrates this: dad430fbf471a3357dc0f4be9a99dfdd In this case, the String date is in the dd/MM/YYYY format.  A...

Convert String to java.time.LocalDate without Formatter

The LocalDate class has a parse method. You can use this to convert a String to a LocalDate. So, this code simply invokes the parse method with the String date object. It prints the following output: 2015-06-12. The following code demonstrates this: cd2973313a135357d0890b0ba8152680 The LocalDate.parse() method requires the String date to be in the yyyy-MM-dd format. If the String date is in some...

How To Use TestNG with Selenium

1. What is TestNG? TestNG is an open-source automated testing framework with flexible and powerful features. It is inspired by JUnit and NUnit but with some additional advantages and functionalities. TestNG gives the developers to build tests with easy annotations, sequencing, grouping, and parameterizing. The ability to generate test reports to get an idea on what test cases passed, failed, and...

Java Tutorial #5 – Loop Statements

Iteration statements are used to repeat a particular block of code until a certain condition is true. In this article, we will be taking a look at Java’s iteration statements. While Statement The while statement repeats a block of code as long as a condition is true. Syntax A while statement has the following syntax: while (condition){ //body of the loop } The while keyword is followed...

Convert String to Date Using java.util.Calendar

The java.util.Calendar class also encapsulates a date. The Calendar class has some more features than the java.util.Date class. It provides the ability to extract the day, month, year, and other fields corresponding to the date that the Calendar represents. So, sometimes, you may need to convert a String date to a Calendar instance. For this, you first need to...

Convert String to Date Using SimpleDateFormat Class

Sometimes, you may need to convert a String to a java.util.Date object. For this, you need to use the SimpleDateFormat class. You need to specify the format in which the String date is present and invoke the parse method. The following code demonstrates how this can be done: 9511d34805f97b537363b6106339b495 This code creates a SimpleDateFormat instance. Since the input date is in...
HomeWeblog

FT AUTOMATION

Common Errors with QTP/UFT – Part 2

Welcome to the second and final part of this series on 'Common Errors for QTP/UFT'! Earlier, we...

HOW-TO'S

How To Install Pacman For Git on Windows

The 'Git for Windows' by default does not come with MSYS2 package manager called 'Pacman' and hence...

NFT AUTOMATION

Working with JMeter Listeners

About Listeners Listeners are used for displaying test results in JMeter. Listeners allow system engineers to analyze the...

PROGRAMMING

Early Bound Vs Late Bound (Binding)

What is Binding Before we dive into 'Early' and 'Late' stuff, let us discover, what the 'Binding' itself...

Convert List to Array Using For-Loop

The simplest way to convert a List to an array is to use a for-loop. The following code snippet demonstrates this method. First, the code creates an Array based on the number of elements in the input List. A for-loop is then used which iterates through the input List and adds each element of the List to an Array. Finally,...

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 VBScript. As mentioned in the last post, we can use the following preferred methods to achieve this : Using the WSH Shell object Using WMI's Win32_Environment class In the below example we would be using the WSH Shell's Environment method. For 'strEnvVarType',...

How To Read Windows Environment Variables With VBScript

Reading an environment variable is simple. There are a couple of methods available to do this but the main preferred ones are the below two : Using the WSH Shell object Using WMI's Win32_Environment class In the below example we would be using the WSH Shell's Environment method. For 'envVarType', the valid parameters for Environment are PROCESS, SYSTEM, USER and...

How To Load XML File into DOM Using MSXML

Microsoft XML Core Services (MSXML) provides two methods for loading XML documents into the Document Object Model (DOM) and one method and one property for serializing that object model back into an XML stream. The load and loadXML methods parse documents into a DOM. You can use the load method to load an XML file by pathname, URL 7ae75e517e8831f3ea4b1ca3bc74c19f

Introducing Testing-as-a-Service (TaaS)

The 'Cloud Computing' technology has revolutionized the IT industry and it has something good to offer to the testing industry too. After Iaas, PaaS, and SaaS concepts, there is a new testing area called Testing as a Service (TaaS) that is making waves in recent times. Increasing IT costs, shrinking budgets and growing business demands pose a great challenge...

Automation Tools Comparison (SilkTest vs QTP vs Selenium)

While manual testing and automated testing go hand in hand, one of the important benefits of automated testing is the assurance that the software is reliable even after updates. In addition, redundancy detection tests ensure that the integrity of the software is maintained while operational costs are optimized. The increasing usage of automation tools in recent times has brought in several...

Virtualization Technology in Intel Processors (VT)

As one of the best practices, businesses are always on the run to leverage resources to the fullest. Virtualization has offered a great way to optimize business resources. The world is running after virtualization while multi-core, multi-tasking, hyperthreading have been in the market for too long now that for innovative businesses, they are already spent force! The new buzzword is...

CODE SNIPPETS | CODEX

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...

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...

How To Change Your Default Linux Shell

The shell is a program that accepts and interprets commands. Besides bash, Linux supports many other shell programs,...

ÂÂ

Feed Subscription

Popular Projects