Ranorex

form.Text throws exception if window has no title

 
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
p.zott



Joined: 22 Jul 2006
Posts: 19

PostPosted: 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
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 343

PostPosted: 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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> Bug Reports All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum