| View previous topic :: View next topic |
| Author |
Message |
p.zott
Joined: 22 Jul 2006 Posts: 19
|
Posted: Mon Feb 04, 2008 8:12 pm Post subject: form.Text throws exception if window has no title |
|
Hi,
The following code throws an exception if the forms title is empty:
Code: click into code to enlarge
foreach (Form form in Application.Forms)
{
try
{
if (form.Text.Contains("Microsoft Word"))
{
// do something
}
}
catch (CommandFailedException)
{ }
}
I use the version V1.3.
Peter |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 343
|
Posted: Tue Feb 05, 2008 10:28 am Post subject: |
|
You're right, Form.Text throws a CommandFailedException if Application.ErrorAsException is enabled and the form got no title (i.e. only an empty one). An empty string should be returned instead.
This is a known bug in RanorexNet V1.3.1 and will be fixed in V1.4.
Regards,
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
|