Ask a Question

How to separate strings in web testing

rachelle
Contributor

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 1
YMinaev
Staff

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.
------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: