Forum Discussion

rachelle's avatar
rachelle
Contributor
14 years ago

How to separate strings in web testing

Hi all,



Just a question, I currently want to save to a variable a string I want to get in a website but when I highlight that particular string of text the other text is also included during highlight using object properties. For example:



Your key: A1234567890



The whole string Your key: A1234567890  is included and I only wanted to save A1234567890. How do I make it that it only gets A1234567890?

1 Reply

  • Hi,



    Try using regular expressions (a regular expression for A1234567890 will be \w\d{10}).

    See the "Using Regular Expressions in Scripts" and "Working With Strings" help topics.