This should be a very simple test.

On a form.

Last name field is required.

If you press enter at the last name field, it brings up a dialog box which tells you this is a required field.

Press Ok on the dialog box and focus should return to the last name field.

I'm attempting to script this but when Robot gets the properties it removes focus from the last name field therefore focus is false!

How do I get around this ?

Doesn't it seem illogical to even test for focus if in doing so you remove focus ?

I have seen the references to getting around this buy using SQAgetproperties but is this the only way ?