File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
java/client/test/org/openqa/selenium Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -553,4 +553,30 @@ public void shouldReturnDocumentElementIfDocumentIsReturned() {
553
553
assertTrue (value instanceof WebElement );
554
554
assertTrue (((WebElement ) value ).getText ().contains ("A single line of text" ));
555
555
}
556
+
557
+ @ Test (timeout = 10000 )
558
+ @ Ignore (value = IE , reason = "returns WebElement" )
559
+ @ Ignore (PHANTOMJS )
560
+ @ Ignore (SAFARI )
561
+ public void shouldHandleObjectThatThatHaveToJSONMethod () {
562
+ driver .get (pages .simpleTestPage );
563
+
564
+ Object value = executeScript ("return window.performance.timing" );
565
+
566
+ assertTrue (value instanceof Map );
567
+ }
568
+
569
+ @ Test (timeout = 10000 )
570
+ @ Ignore (CHROME )
571
+ @ Ignore (IE )
572
+ @ Ignore (PHANTOMJS )
573
+ @ Ignore (SAFARI )
574
+ @ Ignore (value = MARIONETTE , issue = "https://github.com/mozilla/geckodriver/issues/904" )
575
+ public void shouldHandleRecursiveStructures () {
576
+ driver .get (pages .simpleTestPage );
577
+
578
+ Object value = executeScript ("var obj1 = {}; var obj2 = {}; obj1['obj2'] = obj2; obj2['obj1'] = obj1; return obj1" );
579
+
580
+ assertTrue (value instanceof Map );
581
+ }
556
582
}
You can’t perform that action at this time.
0 commit comments