Hi,
I wonder how to clear the text of the date.I try to two method.It doesn't work.
one method:
Ranorex.Control conDate1="/form[@controlname='FrmMain']/element[@controltypename='MdiClient']/form[@controlname='FrmBasHR_PersonnelFile']/container/container[@controlname='splitHorizontal']/container[@controlname='panel1']/container[@controlname='pnlGrid']/container[@controlname='splitControl']/container[@controlname='panel1']/container[@controlname='pnlListTop']/element[@controlname='dte_RZDate' and @controltypename='DateEdit']";
conDate1.Element.SetAttributeValue("ControlText","");
This method is not clearing the text of date.
the other method:
Ranorex.Text txtDate1="/form[@controlname='FrmMain']/element[@controltypename='MdiClient']/form[@controlname='FrmBasHR_PersonnelFile']/container/container[@controlname='splitHorizontal']/container[@controlname='panel1']/container[@controlname='pnlGrid']/container[@controlname='splitControl']/container[@controlname='panel1']/container[@controlname='pnlListTop']/element[@controlname='dte_RZDate']/text[@controltypename='TextBoxMaskBox']";
txtDate1.DoubleClick();
txtDate1.PressKeys("Delete");
This method could clear selected date,but it will show current date.Who can help me?
Best regards
Linna
How to clear the text of the date
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to clear the text of the date
Hi,
How do you normally (without the use of Ranorex) clear the text of the date field?
May I ask you to post a screenshot of the specific element?
Thanks,
Markus
How do you normally (without the use of Ranorex) clear the text of the date field?
May I ask you to post a screenshot of the specific element?
Thanks,
Markus