Page 1 of 1
How to validate text in a log file
Posted: Thu Jul 27, 2017 5:24 pm
by bertrobb
Is there a quick and easy way to validate a text string in a log file without calling out the editor, open the file, find the string, then close the file?
Re: How to validate text in a log file
Posted: Fri Jul 28, 2017 9:56 am
by jma
Hi bertrobb,
Since Ranorex is based on the .NET framework you can easily implement such a use case.
First, please create a
user code action which allows you to implement your custom code.
In order to read text directly from a file, you will need to use the corresponding methods from the .NET framework, for example:
https://docs.microsoft.com/en-us/dotnet ... -text-file
After that, you can validate the string value by using the
Validate-class from the Ranorex API.
I hope that helps.