Mouse.LeftDown() is released

Apr 7, 2009 at 8:09 AM
Edited Apr 7, 2009 at 9:16 AM

Hello,

It seems that I have a problem with the Mouse.LeftDown().  

SearchCriteria sc = SearchCriteria.ByAutomationId(ID);

UIItem uiitem = (UIItem)_window.Get(sc);

int x = (int) uiitem.Bounds.TopRight.X;

int y = (int) uiitem.Bounds.TopRight.Y;

Mouse.Instance.Location = new System.Drawing.Point(x + 3, y + 3);

System.Threading.Thread.Sleep(1000);

Mouse.LeftDown();

System.Diagnostics.Debug.WriteLine(System.Windows.Input.Mouse.LeftButton);

Mouse.Instance.Location = new System.Drawing.Point(1500, 1100);

Mouse.LeftUp();

 
I cannot move the uiitem and the WriteLine results “Released”.

Any suggestions?

 

Thanks,

iser