Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkpoint for part of innertext property
#1
Solved: 11 Years, 4 Months ago
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.
Reply
#2
Solved: 11 Years, 4 Months ago
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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 11 Years, 4 Months ago
OK, thanks!
But you agree that I have to use scripting and cannot achieve this in any way within the checkpoint properties dialog box?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of parameters missing when passing between actions skumar007 1 2,990 10-10-2014, 02:00 AM
Last Post: skumar007
  Webelement innertext is not case sensitive san4hex 7 6,231 05-13-2013, 02:59 PM
Last Post: basanth27
  Parameterizing a part of script itsnotmyid 3 3,454 08-09-2011, 09:02 AM
Last Post: parminderdhiman84
Question Doesn't store value into database using Innertext Langxii 1 2,886 07-05-2011, 07:48 PM
Last Post: rajpes
  Exist returns false with part of innertext Milindt43 1 2,928 02-23-2011, 09:56 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)