Sign up for the Testim Dev Kit beta. Sign up now

Handling Dynamically Changing Elements

Quite often there are some elements and attributes that change dynamically on a page. For example - Say you have…

By Testim,

Quite often there are some elements and attributes that change dynamically on a page. For example – Say you have a currency conversion application. Today, 1 US Dollar would be equal to 0.89 Euros. The same dollar could be 0.90 Euros the very next day; as they change dynamically on a daily basis. In Testim, you have the following ways to handle dynamically changing elements-

Tip 1: Validating Dynamically Changing Elements

Whenever you want to validate dynamically changing elements, Testim has export parameters to handle this situation. 

For example – Say you want to validate the price of your flight trip. The price changes dynamically on a daily basis based on multiple factors. In this case, you can use export parameters; where in, you can store the element in an export variable and use the variable in different steps as parameters and also use it to do different validations in a page.

Tip 2: Generating random values during run time

Quite often there is a need to generate random values containing text, numbers and certain prefixes during run time. This is possible using the generate random value step in Testim. The value gets stored in a variable name which can be used in other steps as well. By default the variable name is randomValue.

Testim's latest articles, right in your inbox.

From our latest feature releases, to the way it impacts the businesses of our clients, follow the evolution of our product

Blog Subscribe