Unable to automate DateTimeEditBox.

Editors for WPF Forum

Posted 7 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 7 years ago]

Comments (3)

Posted 7 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 7 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 7 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 (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.