JunlinZhu
JunlinZhu
Using absolute xpath generated by UIRecorder should be much faster.
Microsoft has made a fix in Internet Explorer for this issue: https://connect.microsoft.com/IE/feedback/details/802625
The page is rendered the same as the IE9 screenshot under Chrome and Firefox.
Try adding following override method OnCreateAutomationPeer in your CustomControl class and see if it works for you: protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer() { return new System.Windows.Automation.Peers.FrameworkElementAutomationPeer(this); }
Hi @NeelakandanKannan, Please take a look at the workaround suggested on #629.
Unfortunately you cannot cast WindowsElement to System.Windows.Automation.AutomationElement if that is what you want. As a workaround you can call AutomationElement.FromPoint with screen coordinate of WindowsElement object to get the System.Windows.Automation.AutomationElement...
Add references UIAutomationClient, UIAutomationTypes, and WindowsBase to your C# project for the following code to build. Let me know if this works for you. var winElement = [Your code calling...
Can you check if UIRecorded generated xpath is copied correctly to your code? Try remove the space after the first / (from "/ Pane" to "/Pane").
You can try something like the following: var pt = gridPattern.GetItem(1, 1).GetClickablePoint(); session.Mouse.MouseMove(null, pt.X, pt.Y); session.Mouse.ContextClick(null);
Try reset cursor position by calling MouseMove with (-pt0.X, -pt0.Y) after Click(null): var pt0 = gridPattern.GetItem(13, 1).GetClickablePoint(); session.Mouse.MouseMove(null,(int)pt0.X, (int)pt0.Y); session.Mouse.Click(null); session.Mouse.MouseMove(null,(int)-pt0.X, (int)-pt0.Y);