File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,9 @@ public WebDriverResult Status
87
87
/// <returns>A <see cref="Response"/> object described by the JSON string.</returns>
88
88
public static Response FromJson ( string value )
89
89
{
90
- return JsonConvert . DeserializeObject < Response > ( value ) ;
90
+ JsonSerializerSettings settings = new JsonSerializerSettings ( ) ;
91
+ settings . DateParseHandling = DateParseHandling . None ;
92
+ return JsonConvert . DeserializeObject < Response > ( value , settings ) ;
91
93
}
92
94
93
95
/// <summary>
Original file line number Diff line number Diff line change @@ -738,6 +738,23 @@ public void ShouldBeAbleToPassInMixedArguments()
738
738
739
739
}
740
740
741
+ [ Test ]
742
+ [ Category ( "Javascript" ) ]
743
+ public void ShouldBeAbleToPassInAndRetrieveDates ( )
744
+ {
745
+ string function = "displayMessage(arguments[0]);" ;
746
+
747
+ if ( ! ( driver is IJavaScriptExecutor ) )
748
+ return ;
749
+
750
+ driver . Url = javascriptPage ;
751
+
752
+ ExecuteScript ( function , "2014-05-20T20:00:00+08:00" ) ;
753
+ IWebElement element = driver . FindElement ( By . Id ( "result" ) ) ;
754
+ string text = element . Text ;
755
+ Assert . AreEqual ( "2014-05-20T20:00:00+08:00" , text ) ;
756
+ }
757
+
741
758
private bool CompareLists ( ReadOnlyCollection < object > first , ReadOnlyCollection < object > second )
742
759
{
743
760
if ( first . Count != second . Count )
You can’t perform that action at this time.
0 commit comments