Hallo,
The datetime is displayed in WPF form differently than in spy window.
WPF definition:
<Label Name="lblValidFrom" Grid.Column="1" Content="{Binding IssuersInformation.ValidFrom}" Style="{StaticResource h3}" ContentStringFormat="dd.MM.yy HH:mm:ss" />
see in attachment...
This is how I need to parse it. ActiveCILValidFrom is repository item.
Ranorex.Text from = TechOpsApplication_Toll_Context_ValidationRepository.Instance.TechnicalOppAppl.ActiveCILValidFrom;
dt = System.DateTime.ParseExact(from.TextValue, "M/d/yyyy h:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
it is correct?
J.Matous
WPF date readed as different format
-
- Posts: 5
- Joined: Wed Apr 05, 2017 9:39 am
WPF date readed as different format
You do not have the required permissions to view the files attached to this post.
Re: WPF date readed as different format
Hi,
Please upload a Ranorex snapshot (not screenshot) of the problematic element. Also, you forgot to mention Ranorex version! There were done some major changes related to WPF in Ranorex 7.0. Also, have you tried other WPF-related settings (in Ranorex settings >> Plugins tab >> WPF section)?
Anyway, I'm not quite sure what exactly is your problem? According to your post, you trying to obtain datetime in different format than is defined in given WPF element, but then you mention Spy shows something different? So what exactly is the problem? The datetime output you get from ParseExact or just the Spy interpretation?
Please upload a Ranorex snapshot (not screenshot) of the problematic element. Also, you forgot to mention Ranorex version! There were done some major changes related to WPF in Ranorex 7.0. Also, have you tried other WPF-related settings (in Ranorex settings >> Plugins tab >> WPF section)?
Anyway, I'm not quite sure what exactly is your problem? According to your post, you trying to obtain datetime in different format than is defined in given WPF element, but then you mention Spy shows something different? So what exactly is the problem? The datetime output you get from ParseExact or just the Spy interpretation?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration