The LEAP

Automation insights and productivity tips from LEAPWORK.

All Posts

How to Use Dates and Times in Test Automation

Dates and timestamps are important in most test automation scenarios. For instance, when testing user sign-up flows, entering a birthday or social security number is often required. Or when validating expiration dates during web content testing, generating a date/time value exactly one week from today might be needed.

Working with dates and timestamps in LEAPWORK is very easy and flexible, using the Generate date/time, Offset date/time and Set date/time building blocks. Here's a simple example of how to get today's date and then add one year to it:

Get today's date and offset by a year using LEAPWORK

Below is another example in LEAPWORK, which generates a date that is the first day of a random month in the year 2016:

Get first day of a random month in the year 2016 using LEAPWORK

Claus Topholt
Claus Topholt
CTO and co-founder of LEAPWORK.

Related Posts

LEAPWORK vs. Selenium Web Automation

Selenium WebDriver is great for automating browsers, but as a stand-alone automation tool it has some limitations. This post compares script-based Selenium automation with LEAPWORK web automation.

Reduce Maintenance Workload 97% with Context-Driven Test Automation

IT projects are multidimensional and difficult to perceive. How do you test a project with potentially infinite dimensions?

Prove Your Skills with a Test Automation Certification

When a company decides to adopt new methods or change existing processes, for example by rolling out new software, it often requires that employees upgrade their skill set or learn completely new skills. One way to ensure that an employee has the required skills is to rely on certification. The same goes for consultants who need to document that they are proficient in the tasks they are hired to do.