Skip to content

Commit abb15d2

Browse files
committed
Moved highlighting to different thread
1 parent 51399ac commit abb15d2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/TestStack.White/UIItems/UIItem.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,15 @@ public virtual void RaiseClickEvent()
431431
/// </summary>
432432
public virtual void DrawHighlight()
433433
{
434-
Rect rectangle = this.AutomationElement.Current.BoundingRectangle;
434+
new Thread(() =>
435+
{
436+
Rect rectangle = this.AutomationElement.Current.BoundingRectangle;
435437

436-
if (rectangle != Rect.Empty)
437-
{
438-
new Drawing.FrameRectangle(rectangle).Highlight();
439-
}
438+
if (rectangle != Rect.Empty)
439+
{
440+
new Drawing.FrameRectangle(rectangle).Highlight();
441+
}
442+
}).Start();
440443
}
441444
}
442445
}

0 commit comments

Comments
 (0)