Unable to automate DateTimeEditBox.

Editors for WPF Forum

Posted 2 years ago by Piyush Parsai
Version: 16.1.0634
Avatar

Hello Team,

I am trying to automate DateTimeEditBox which is formatted to show only date and time as "hh:mm". Initially it shows *:* and if we try to assign value to it thourgh automation it will not accept. Using UI Spy we could see there are different PART_MaskedTextbox used to show hh and mm values. I've attached a screen shot.

[Modified 2 years ago]

Comments (3)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Piyush,

I just used UIVerify and focused the DateTimeEditBox and was able to use the Value pattern to enter an alternate value ok.  Make sure you use the overall control's UI automation peer instead of the one for MasketTextBox.


Actipro Software Support

Posted 2 years ago by Piyush Parsai
Avatar

Hello,

Thanks a lot for the quick reply, it will be really helpfull if you could share a small example of using UI Automation peer for DateTimeEditBox control.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We just used the VisualUIVerify app and selected the DateTimeEditBox control in its UIA tree.  Then in VisualUIVerify's Properties tool window, we expanded out the Patterns / Value Pattern node, updated the SetValue item to a different date, and pressed Enter.  That updated the value in the WPF app.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.