TestProject Forum

Delivery Window Validation

Hi,

I have a scenario where i need to validate the delivery window of the shipping product. Eg: The expected result for the delivery window is “Less than 8-10 Weeks” but the actual delivery window appearing in the website is “Usually delivers in 3 to 4 weeks” this is a valid result. Can someone please help me how to validate this in TestProject?

Hi @ashok.acs,

I will show you the general idea on how to achieve this.
So the flow will be like this:
Get the text of the “Less than…” and the text of the “Usually…” and save them to 2 different parameters(lets say the first text is lessText and the other one usualText) → extract the first number from the lessText → extract the first number from the usualText → check if “Less” word contained inside lessText → check if the first number of usualText is less then the first number of lessText.

To get text we will use this action:

To extract the first number we will use this action:

To check if lessText has the word “Less”:

And in the above step, we will go to advanced options, and check if the first number of usualText is less then the first number of lessText:
image