Micro Focus QTP (UFT) Forums

Full Version: Checkpoint for part of innertext property
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have a checkpoint that checks the innertext property of a Webelement (DIV) The text to check ("© 2005, Mercury Interactive (v. 011003-1.01-058)") is defined as a constant value in the checkpoint properties box. It works so far, but how could I check only for a part of the innertext, eg. only check for the year ("2005")? It seems to me that in the checkpoint properties dialog box I can only check for the entire innertext!? Or would here help the constant value options dialog box with its possibility for regular expressions?

Thanks, P.
If the year always occur at the same place ie 2nd then do this:

  1. Use GetRoproperty to extract the text and store it in a variable.
  2. Using split function with space (" ") as delimiter put the text into the array (arr)
  3. arr(1) will have your answer.
OK, thanks!
But you agree that I have to use scripting and cannot achieve this in any way within the checkpoint properties dialog box?