Ranorex

Strange behavior of DoDefaultAction() and Mouse.ClickElemen

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
lasombra



Joined: 04 Mar 2008
Posts: 9

PostPosted: Tue Mar 18, 2008 4:56 pm    Post subject: Strange behavior of DoDefaultAction() and Mouse.ClickElemen
As mentioned in my post http://www.ranorex.com/forum/open-modaldialog-blocks-testclient-t354.h tml I have a strange behavior, that an element found, has the wrong coordinates, such that Mouse.ClickElement() does not work.
Well I have a loop, that is looking for an element and press a menu button. If the button is pressed by Mouse.ClickElement() the first time, this works well. But the following times the element has the wrong coordinates and thus the mouse cursor goes to the wrong position.

For the same test case I try to use the [code]DoDefaultAction(). The behavior of this is similar: The first time all works well, the following times the DoDefaultAction() does nothing.

While debugging I see, that the correct element is found and the default action is "press". So why it does not what I expect?

My Version of Ranorex: 1.2
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 256

PostPosted: Tue Mar 18, 2008 5:56 pm    Post subject:
Could you please post the code snippet the problem occurs in? In particular the loop and the search code! How many items are accessed within the loop?

This might be a problem of the element caching algorithm (see topic Problems automating Infragistics DataGrid control) which is fixed with the upcoming 1.4 Ranorex release, but I'm not sure of that.

If you are trying to click menu items, the best way is to use the Menu or MenuStrip class which both provide a SelectItemText method.

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 -> RanorexNet 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