# Tips and tricks - General

The following tips and tricks are relevant for all AUT technologies.

In this topic:

## Return a test object collection to match a description

C# and Java: | Use the <TestObject>.FindChildren method.
JavaScript: | Use .$$ syntax. For details, see Setting up and working with the JavaScript SDK

Back to top

## Use a regular expression for a property value

C#: | IDProp = As.RegExp(@"RegExpValue")
Java: | .idProp(new RegExpProperty("RegExpValue"))
JavaScript: | idProp:/RegExpValue/

For more details, see Regular expression guidelines.

Back to top

## Use SDK exceptions to debug your test

LeanFT information from SDK exceptions can be helpful when debugging your test.

For example:

ReplayObjectNotFoundException | Thrown during a test run when no object matches the test object description.
ReplayObjectNotUniqueException | Thrown during a test run when more than one object matches the test object description.

Back to top

## Pause a spying operation

While spying on objects with the Object Identification Center (OIC), you may want to temporarily pause the spying operation, for example to use your mouse to bring another application into focus.

Press and hold Ctrl on your keyboard to pause the spy while performing other mouse operations.

Back to top

## Type text and special characters

Type text and special characters, such as ALT, F1 keys, Esc, CapsLock, etc. into fields in your application.

Use the SendKeys method with constants from the Keys class.

Back to top

## Capture text from my application using OCR

To capture text from within a specific object in your application, use the GetVisibleText and GetTextLocations methods, available for all test objects.

You can also capture an image of any part of your application and then use the GetText and LocateText methods of the ImageUtils class to capture text from within a supplied image.

For more details, see Tips & tricks - OCR methods (Windows only) and the .NET SDK Reference, Java SDK Reference, or JavaScript SDK Reference.

Back to top

See also:

- Tips & tricks - Web testing
- Tips and tricks - SAP GUI
- Tips & tricks - OCR methods (Windows only)

https://admhelp.microfocus.com LeanFT 8942
Tips to improve your search results...TOC Lean Functional Testing Help Center LeanFT Help Center 14.50 - 14.53 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version:(Undefined variable: _rscC_Basic_Variables.FloatingTocShow)