Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all 585 articles
Browse latest View live

Implementing focus tracking

$
0
0

Hello,

I am working on a Automation Testing project where user can create scripts and run them to automate the Desktop application testing.

To automate testing with an external application, user has to go through two steps:

1. Create Scripts

2. Run Scripts

In first step, user has mention the path of target control element and action to do with that control.

For example, click on a menu item.

In this case, the path of a target menu item would be: <MenuItem><SubMenuItem><SubMenuItem>......<TargetMenuItem>

This path needs to be entered manually by user.

Now, I want to automate this process of path creation. For this, I want to implement focus tracking feature where user will just need to focus/select the elements until the target element. While focusing/selecting, those elements should be highlighted. [For example, red rectangle over the element]

After user selects target element, I can use ancestors of that element to generate the path.

I hope you understood my requirements.

Could you suggest something on this?

Thank you in advance!


Issue reading text from html with  

$
0
0

Hi All, I am reading some string from html file the string is appearing as 2x2&nbsp;s. I understand that this contain non breaking space . But after reading them in C#app . How do i check if string conatin &nbsp or not. I had tried couple of way but thedy didn't worked. Any idea?

 if(strText.Contains(@"\\u00A0"))
       strText = Regex.Replace(strText, @"\u00A0", " ");

Thanks


Rupesh Shukla

How to set up Huawei 4G dongle driver in Windows 10 to use AT commands via virtual serial port

$
0
0

I want to send and receive SMS messages using code in Visual Studio (C#) with AT commands via serial connection.

The device I am using is Huawei E3372, 4G cellular USB dongle

When I plug the dongle into my Windows 10 (64 bit) machine, the Huawei app starts up and I can connect and send/receive sms via the little app ok but I cannot get the dongle set up to enumerate an "AT Command" serial virtual port so I can send and received AT commands directy to the USB dongle.

Anyone have a link or be able to explain how I can set this up please.

Thanks



Listen to Click event from external application

$
0
0

Hello,

I am working on a automation project. I want to listen the click event for ANY element from external application.

AutomationEventHandler UIAEventHandler = new AutomationEventHandler(OnUIAEvent);
                    Automation.AddAutomationEventHandler(InvokePattern.InvokedEvent,
                                            AutomationElement.RootElement,
                                            TreeScope.Descendants, UIAEventHandler);

I tried above InvokeEvent, but it is not listening to click events for all elements.

Could you please tell the right method for this purpose?

Thank you in advance!

Raise UIA_Invoke_InvokedEventId for Win32 menu items

$
0
0

I'm developing a Win32 application and now want to add UI Automation for menu items but my application does not raise any Invoke_Invoked event (using AccEvent) when a menu item is selected.

I've checked it works fine for Visual Studio, but not for Notepad.

Is there a way to modify my Win32 application to raise such events for menu items ?

Posting a very large application

$
0
0

I have a class PInvokeWin32 that I used in the past but now it does not run. I tried to post it but it turned out to be too large (>60,000) characters. Is there a solution for such large codes? I need to ask some questions about the class.

Thanks, - MyCatAlex

Zooming IN and drawing on screen

$
0
0

I'd like to develop app similar to Windows full screen zoom feature but with multi-screen support. 

How can I access and transform screen contents in efficient way? The best solution would be to have ability to get pixel matrix and do some operations on the matrix to set final pixel colours.

For example I'd like to show on monitor one (from pixel 0,0 to 1920,1024) pixels from 0,0 to 960,512 and on screen 2 (pixels 0,1921 - 3840,1024 some other source rectangle. Additionally I'd like to transform bits to enable large contrast or additional mouse position indicator.

Is it possible to plug some piece of code in between some layers in Windows to enable such feature? Or is there any other, possibly easier way to solve the issue.

How is the Windows Magnification API implemented?


UI Automation API find all blocked by dialog

$
0
0

Hi all,

I use

AutomationElementCollection elements =
        AutomationElement.RootElement.FindAll(TreeScope.Children, new Prope(AutomationErtyConditionlement.ControlTypeProperty, ControlType.Window));

to find all open windows. But if the dialog that I want to automate findAll() is stopping until I have closed that dialog. Does anyone know why this dialog is stoping findAll()? If the dialog is closed findAll() works fine.

Cheers,

Ralph


Ralph

How to unblock UIAutomation when Invoke triggers modal dialog

$
0
0

Using UI Automation I invoke a button in Excel 2010 (let's say the View > Zoom Button) which triggers a modal dialog.

My problem is that I can't use UIAutomation until after I (manually) close that modal dialog.

The problem can be easily replicated by using UISpy.exe to trigger the invoke on the Zoom Button, as long as the modal dialog is open UISpy will not update anything and freeze.

I found some older, similar questions, but so far the recommendations (put the Invoke into a background MTA thread didn't help).

http://social.msdn.microsoft.com/forums/en-US/windowsaccessibilityandautomation/thread/7f0bdc7c-be85-4fde-9f8a-cbb3f16ba5f4/

Any Ideas how I could invoke without blocking?

Reg RunOnce - Open script in Notepad.

$
0
0

I am trying to execute a Powershell script  via the  runonce reg-key, each time it is executed,  the script is opened in notepad instead of executing.  Not sure what i can change   

Associated  PS1  files with Powershell

Added the top line to start the script with admin privileges. 

added -ExecutionPolicy bypass -file   the  Powershell line 

All which do not solve the problem, Does anyone have a suggestions.

if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }

Set-Location -Path C:\Windows\Admin
$LogFile = "C:\Windows\Admin\SetupLog.txt"


if (-not (Test-Path LogFile)) {
    Echo "Clearing ALL systems Events"
    wevtutil el | Foreach-Object {wevtutil cl "$_"}& "C:\Program Files\CCleaner\CCleaner64.exe" /auto
    ipconfig /release
    Out-File -FilePath LogFile
    add-content LogFile "Phase01 $((Get-Date).ToString()) `t Windows events Logs have been cleared."
    Set-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" -Name "NewSetup" -Value "C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe -ExecutionPolicy bypass -file `"C:\Windows\Admin\VMSetup.ps1`" -windowstyle hidden"
    shutdown /s /t 0 /c "Image Ready"
} else{
    Echo "These is nothing to do For PHASE  ONE"
}

dsmove CN=$Env:computername,CN=Computers,DC=DOMAIN,DC=local -d DOMAIN.local -newparent OU=VDIComputers,DC=DOMAINE,DC=local -u USERNAME@DOMAINE.local -p PASSWORD
add-content LogFile "Phase02 $((Get-Date).ToString()) `t Registed MS Windows and MS Office"

Any assistance would be greatly appreciated.   thank you in advance. 

New to UI Automation

$
0
0
Hello everyone!

I am building an automation application that is supposed to be installed on multiple machines, as an exe. I am not as familiar with Microsoft as my time is mostly dedicated to linux. However, this project requires testing of a WPF application, where c# is the right fitment. I built a couple of tools for the project in pywinauto and robotjs, however I have an IsLegacyAsseccible element that is "hidden" until the user scrolls over the table row, and the button icon appears, opening another window.

Traversing Windows API docs, all of the code is is chunks with very few examples of entire sample programs. I have managed to start the program a few different ways in C#, but attaining the window handle and labeling the RootElement has me a lot confused.

Reading the .cpp files for how the UI works, I understand the basic operation, but there is A LOT to learn. My basic instinct says to write a my own modules in .cpp, but that is WAY to laborious for this iteration.

If anyone has direction on how-to, or concrete "step-by-step" basics, that would be amazing. I am still learning C# and am quickly becoming familiar with the nuances and nomenclatures.



Thank you

Control a SaveFileDialog with UI Automation

$
0
0

I want to control a SaveFileDialog (WinForms) from UI Automation (for product testing).

In the SaveFileDialog, I want to set the folder to write to and press the "Save" button. I haven't been able to find the ID's of the controls.

I'm working with C# 6.0, and NUnit for running the tests. From .NET we use Framework 4.5.2.

Can someone shed a light on what the controls are named and maybe point to the source where they are defined? Your help is greatly appreciated!

Below you find the dialog code in product (code behind for the button that calls the SaveFileDialog):

            var dialog = new SaveFileDialog
            {
                FileName = newDefaultFileName,
                DefaultExt = extension,
                Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, "ExcelML"),
                FilterIndex = 1
            };

            if (dialog.ShowDialog() == true)
            {
                try
                {
                    using (Stream stream = dialog.OpenFile())
                    {

                       ......

                    }
                }
                catch (Exception e)
                {
                    Logger.Error("Export(): an exception occurred");
                }
            }

UI Element not visible unless clicked, is there a work around?

$
0
0

Hi,

I'm trying to automate the selection of an element from a drop down menu in an app. The problem is, I'm unable to access the menu in the first place. It does not show up when I hover over it in with Inspect.exe.

If I click open the menu and focus on one of the menu items, then I'm able to see the menu item in Inspect.exe. Its type is an UIA_ListItemControlTypeId and its ClassName is "ListBoxItem". I can trace back through this item's ancestors to the Desktop, which look like this beginning from the immediate parent:

>> "Menu Item" group (ControlType: UIA_GroupControlTypeId, ClassName: GroupItem)
     >> "" pane (ControlType: UIA_PaneControlTypeId, ClassName: ScrollViewer, AutomationId: DropDownScrollViewer)
    >> "" window (ControlType: UIA_WindowControlTypeId, ClassName: Popup)
        >>"MyApp- Microsoft Visual Studio" window (ControlType: UIA_WindowControlTypeId, ClassName: Window).
             >> "Desktop 1" pane

The problem here is that the window element with ClassName "Popup" only sees the main app ("MyApp- Microsoft Visual Studio") as a parent if it has been clicked open and left open--otherwise, Inspect.exe says it has no ancestors if the Popup menu hasn't been clicked opened. Similarly, The window Popup is not shown as a child of the main app.

So my main question is--how can I programatically expand this menu (and access its menu items), which doesn't appear in Inspect.exe until it has been clicked? I wonder if it is possible without sending an input mouse click through the Windows API and accessible directly through the Microsoft UI Automation framework, since I would like to make the automation as close-looped as possible.

Needs (Plugin)code for implementing UIA

$
0
0
 

Hi Thej,

I am also looking for a sample code to implement using UIA instead of MSAA ..can you please mail me sample code attest.house@hotmail.com  .

Thanks.

Location of active element varies according to Edge version

$
0
0

I Used Selenium package for C#.Net and opened a website and pressed tabs and tried to get the active element location. I am getting wrong location values for the below edge version.

Not working Version:

Microsoft Edge 40.15063.674.0 , Microsoft EdgeHTML 15.15063

Microsoft Edge 44.17763.1.0 , Microsoft EdgeHTML 18.17763

Working Version:

               Microsoft Edge 42.17134.1.0 , Microsoft EdgeHTML 17.17134

                

              X position is correct when compare with the screen shot taken

 

ISSUE: X position of active element is not proper when compare to the screen shot taken.

 

Kindly let me know whether any work around is there to resolve this issue.



WinAppDriver Couldnt Recognize App Elements

$
0
0

I am trying to Automate our Windows Forms App which is developed based on Visual basic. I am facing issue in recognizing elements by WinAppDriver.Issue seems like WinAppDriver isn't recognizing the App. I am able to open the App but its not able to recognize the next screen (which takes time to load Application).

protected static WindowsDriver Session = null;
private static WebElement Result = null;

{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app","C:\XXX\XXX\ABC.exe");
Session = new WindowsDriver(new URL("http://127.0.0.1:4723"),capabilities);
Session.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
Result = Session.findElementByName("OK");
Assert.assertNotNull(Result);
}

I tried to see if its recognizing any element by
Session.findElements(By.id("*"));
But I am getting null list.

I am using Selenium 3.14 , Java 1.8, WinAppDriver 1.1, TestNG 6.14

WinAppDriver Log:

POST /session HTTP/1.1
Accept-Encoding: gzip
Connection: Keep-Alive
Content-Length: 318
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
{
"desiredCapabilities": {
"app": "C:\xxx\xx\ABC.exe",
"platformName": "Windows"
},
"capabilities": {
"firstMatch": [
{
"appium:app": "C:\xxx\xx\ABC.exe",
"platformName": "windows"
}
]
}
}
HTTP/1.1 200 OK
Content-Length: 163
Content-Type: application/json
{"sessionId":"300D3A55-8F4E-4B14-8049-0396003FE6B4","status":0,"value":{"app":"C:\xxx\xx\ABC.exe","platformName":"Windows"}}

GET /session/300D3A55-8F4E-4B14-8049-0396003FE6B4 HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
HTTP/1.1 200 OK
Content-Length: 112
Content-Type: application/json
{"status":0,"value":{"app":"C:\xxx\xx\ABC.exe","platformName":"Windows"}}

GET /session/300D3A55-8F4E-4B14-8049-0396003FE6B4 HTTP/1.1
Accept-Encoding: gzip
Cache-Control: no-cache
Connection: Keep-Alive
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
HTTP/1.1 200 OK
Content-Length: 112
Content-Type: application/json
{"status":0,"value":{"app":"C:\xxx\xx\ABC.exe","platformName":"Windows"}}

POST /session/300D3A55-8F4E-4B14-8049-0396003FE6B4/timeouts HTTP/1.1
Accept-Encoding: gzip
Connection: Keep-Alive
Content-Length: 39
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
{
"type": "implicit",
"ms": 60000
}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json
{"sessionId":"300D3A55-8F4E-4B14-8049-0396003FE6B4","status":0}

POST /session/300D3A55-8F4E-4B14-8049-0396003FE6B4/element HTTP/1.1
Accept-Encoding: gzip
Connection: Keep-Alive
Content-Length: 38
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: selenium/3.141.59 (java windows)
{
"using": "name",
"value": "OK"
}
HTTP/1.1 404 Not Found
Content-Length: 139
Content-Type: application/json
{"status":7,"value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters."}}

Console Error:
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'XXX', ip: '10.97.4.254', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: io.appium.java_client.windows.WindowsDriver
Capabilities {app: C:\xxx\xx\ABC.exe..., javascriptEnabled: true, platform: WINDOWS, platformName: WINDOWS}
Session ID: 6D65341F-3DB1-4115-9A4E-F5634C477B1D
*** Element info: {Using=name, value=OK}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:323)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.findElement(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:404)
at io.appium.java_client.DefaultGenericMobileDriver.findElementByName(DefaultGenericMobileDriver.java:118)
at io.appium.java_client.AppiumDriver.findElementByName(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.findElementByName(WindowsDriver.java:1)
at Connexus.setup(Connexus.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:168)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
at org.testng.TestRunner.privateRun(TestRunner.java:648)
at org.testng.TestRunner.run(TestRunner.java:505)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
at org.testng.SuiteRunner.run(SuiteRunner.java:364)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

App is opening, So its not problem with location. But it's not recognized by WinAppDriver. Please let me know If I am doing anything wrong here.

Microsoft Active Accessibility Direct Annotation is not working on Windows 10

$
0
0
Following MFC code sets accessible Name for popup menu item to "accessible text". It works on Windows 7/8 but on Windows 10 accessible name remains "item text".
Please help with fix / workaround.

 CMenu menu1;
 menu1.CreatePopupMenu();
 menu1.AppendMenu(0, 1, TEXT("item text"));

 CComPtr<IAccPropServices> accPropServices;
 accPropServices.CoCreateInstance(CLSID_AccPropServices, nullptr, CLSCTX_SERVER);
 accPropServices->SetHmenuPropStr(menu1, 1, PROPID_ACC_NAME, L"accessible text");
I check accessible properties with Windows SDK's inspect.exe

Windows 10 blurry appilication icon in the taskbar.

$
0
0

I have created an .ico for my application in WPF, I included the following resolutions in it: 16x16, 24x24, 32x32, 48x48 and 256x256.

The icon of the application is displayed correctly in every place except for the taskbar...
trying to find whats going on I created a test .ico that includes all resolutions from 16x16 to 32x32, It turns out that for the taskbar, windows 10 do not use the 24x24 as it fits... but they resize the 32x32...
is there any workaround for this issue? probably there is... or how other programs have crispy icons in the taskbar...

I also found this thread from 2015 which also addresses the same issue:

Taskbar scales down icons, using larger sizes and making them blurry

seems like nothing changed since then

Thanks in advance

UIAutomation WPF COM Access Violation Exception

$
0
0

Hi, 

I am using UIAutomation to test a WPF app where I have created a few of my own peers. Occasionally I get an exception in the COM layer which completely crashes my application under test. I have managed to get a crash dump but it doesn't seem to relate to any of my code. Does anyone know what might be causing this? Or anyway to get more information?  

Event Viewer

2018-05-11 10:18:13,000 Level=2 Faulting application name: XXXXX.exe, version: XXXX, time stamp: 0x5af43754
Faulting module name: UIAutomationCore.dll, version: 7.0.0.0, time stamp: 0x4a5bdb1d
Exception code: 0xc0000005
Fault offset: 0x00008f23
Faulting process id: 0x2254
Faulting application start time: 0x01d3e9086fc10688
Faulting application path: C:\XXXX.exe
Faulting module path: C:\Windows\system32\UIAutomationCore.dll
Report Id: 3a3a7f26-54fc-11e8-951f-6c626de989be

Dump Stack

Call stack below ---
 # ChildEBP RetAddr  Args to Child              
00 242ceb50 19390992 00000000 11dd1b38 11e275d0 UIAutomationCore!QI<IRawElementProviderSimple>+0x9 (FPO: [Non-Fpo])
01 242ceb78 193bc4c9 18f12a94 00000000 00000001 UIAutomationCore!UiaNode::CrossProcess_SetFocus+0x11c (FPO: [Non-Fpo])
02 242ceba0 193bd562 11e275d0 193ed740 11dd1b38 UIAutomationCore!RemoteUiaNodeStub::Incoming_SetFocus+0x46 (FPO: [Non-Fpo])
03 242cebbc 193b7b4b 11e275d0 193ed740 11dd1b38 UIAutomationCore!RemoteUiaNodeStub::OnMessage+0x93 (FPO: [Non-Fpo])
04 242cebdc 193b27e2 242cebf8 242cec14 193b7b94 UIAutomationCore!InvokeOnCorrectContext2_Callback+0x1c (FPO: [Non-Fpo])
05 242cebe8 193b7b94 193b7b2f 242cebf8 193bd4cf UIAutomationCore!NullInvoker::CallTarget+0xb (FPO: [Non-Fpo])
06 242cec14 193b8aac 193bd4cf 11e275d0 193ed740 UIAutomationCore!InvokeOnCorrectContext+0x40 (FPO: [Non-Fpo])
07 242cec58 193b8f7a 242cec70 242cec84 11dd1b38 UIAutomationCore!ProcessIncomingRequest+0x142 (FPO: [Non-Fpo])
08 242cfc9c 193b6c64 242d0060 00000006 11dc8578 UIAutomationCore!ChannelBasedServerConnection::OnData+0x52 (FPO: [Non-Fpo])
09 242cfccc 193b67b8 242cfce4 00000000 00000000 UIAutomationCore!ReadWriteChannelInfo::Service+0x178 (FPO: [Non-Fpo])
0a 242cfcec 193b69d2 242cfd00 75d2343d 193ed7c8 UIAutomationCore!OverlappedIOManager::IoThreadProc+0x27 (FPO: [Non-Fpo])
0b 242cfcf4 75d2343d 193ed7c8 242cfd40 773c9832 UIAutomationCore!OverlappedIOManager::StaticIoThreadProc+0xd (FPO: [Non-Fpo])
0c 242cfd00 773c9832 193ed7c8 14efdeeb 00000000 KERNEL32!BaseThreadInitThunk+0xe (FPO: [Non-Fpo])
0d 242cfd40 773c9805 193b69c5 193ed7c8 00000000 ntdll!__RtlUserThreadStart+0x70 (FPO: [Non-Fpo])
0e 242cfd58 00000000 193b69c5 193ed7c8 00000000 ntdll!_RtlUserThreadStart+0x1b (FPO: [Non-Fpo])

Thanks 

Ronnie



Coded UI Tests WaitUntilClickable on AutomationElement timing out

$
0
0

Hi,

I'm facing a strange situation where the WaitUntilClickable function seems to time out while attempting to right click on a Grid that is visible and enabled. What makes it perplexing is that it stopped working suddenly and this function still works from a test and playback recording.

I'm looking for some pointers on what could cause it, something I may be missing...

Any help is greatly appreciated!

 private bool MouseClick(MouseButton button, AutomationElement element)
    {
      try
      {
        element.WaitUntilClickable(_waitTimeSpan);
        Mouse.MoveTo(element.BoundingRectangle.Left + LEFTPADDING, element.BoundingRectangle.Top + TOPPADDING);
        Mouse.Click(button);
        return true;
      }
      catch (Exception ex)
      {
                return false;
      }
    }

Thanks,

Reshma

Viewing all 585 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>