@@ -107,7 +107,7 @@ public void DataAnnotationsWorkForForms(bool suppressEnhancedNavigation)
107107 {
108108 var error = Assert . Single ( errors ) ;
109109 Assert . Equal ( "Name is too long" , error . Text ) ;
110- Assert . Equal ( "John" , Browser . FindElement ( By . CssSelector ( "input[name='Parameter.FirstName']" ) ) . GetAttribute ( "value" ) ) ;
110+ Assert . Equal ( "John" , Browser . FindElement ( By . CssSelector ( "input[name='Parameter.FirstName']" ) ) . GetDomProperty ( "value" ) ) ;
111111 } ,
112112 } ;
113113 DispatchToFormCore ( dispatchToForm ) ;
@@ -150,7 +150,7 @@ public void MultipleParametersMultipleFormsDoNotConflict(bool suppressEnhancedNa
150150 {
151151 var error = Assert . Single ( errors ) ;
152152 Assert . Equal ( "The value 'abc' is not valid for 'Id'." , error . Text ) ;
153- Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "form[name=bind-integer] input[name=Id]" ) ) . GetAttribute ( "value" ) ) ;
153+ Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "form[name=bind-integer] input[name=Id]" ) ) . GetDomProperty ( "value" ) ) ;
154154 } ,
155155 SuppressEnhancedNavigation = suppressEnhancedNavigation ,
156156 } ;
@@ -265,8 +265,8 @@ public void CanDisplayErrorsFromMultipleParametersToTheDefaultForm(bool suppress
265265 {
266266 Assert . Equal ( "The value 'invalid' is not valid for 'OtherParameter'." , error . Text ) ;
267267 } ) ;
268- Assert . Equal ( "abcd" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetAttribute ( "value" ) ) ;
269- Assert . Equal ( "invalid" , Browser . FindElement ( By . CssSelector ( "input[name=OtherParameter]" ) ) . GetAttribute ( "value" ) ) ;
268+ Assert . Equal ( "abcd" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetDomProperty ( "value" ) ) ;
269+ Assert . Equal ( "invalid" , Browser . FindElement ( By . CssSelector ( "input[name=OtherParameter]" ) ) . GetDomProperty ( "value" ) ) ;
270270 } ,
271271 SuppressEnhancedNavigation = suppressEnhancedNavigation ,
272272 } ;
@@ -294,7 +294,7 @@ public void CanHandleBindingErrorsBindParameterToTheDefaultForm(bool suppressEnh
294294 {
295295 Assert . Equal ( "The value 'abc' is not valid for 'Parameter'." , error . Text ) ;
296296 } ) ;
297- Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetAttribute ( "value" ) ) ;
297+ Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetDomProperty ( "value" ) ) ;
298298 }
299299 } ;
300300 DispatchToFormCore ( dispatchToForm ) ;
@@ -331,7 +331,7 @@ public void CanBindComplexTypeToDefaultForm(bool suppressEnhancedNavigation)
331331 {
332332 // Verify the same form element is still in the page
333333 // We wouldn't be allowed to read the attribute if the element is stale
334- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
334+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
335335 }
336336 }
337337
@@ -388,7 +388,7 @@ public void CanBreakFormIntoMultipleComponents(bool suppressEnhancedNavigation)
388388 {
389389 // Verify the same form element is still in the page
390390 // We wouldn't be allowed to read the attribute if the element is stale
391- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
391+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
392392 }
393393 }
394394
@@ -439,7 +439,7 @@ public void CanBreakFormIntoMultipleComponentsDisplaysErrorsCorrectly(bool suppr
439439 {
440440 // Verify the same form element is still in the page
441441 // We wouldn't be allowed to read the attribute if the element is stale
442- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
442+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
443443 }
444444 }
445445
@@ -477,7 +477,7 @@ public void CanDisplayBindingErrorsComplexTypeToDefaultForm(bool suppressEnhance
477477 {
478478 // Verify the same form element is still in the page
479479 // We wouldn't be allowed to read the attribute if the element is stale
480- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
480+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
481481 }
482482 }
483483
@@ -512,7 +512,7 @@ public void CanBindDictionaryToDefaultForm(bool suppressEnhancedNavigation)
512512 {
513513 // Verify the same form element is still in the page
514514 // We wouldn't be allowed to read the attribute if the element is stale
515- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
515+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
516516 }
517517 }
518518
@@ -551,7 +551,7 @@ public void CanDisplayBindingErrorsDictionaryToDefaultForm(bool suppressEnhanced
551551 {
552552 // Verify the same form element is still in the page
553553 // We wouldn't be allowed to read the attribute if the element is stale
554- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
554+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
555555 }
556556 }
557557
@@ -595,7 +595,7 @@ public void CanBindCollectionsToDefaultForm(bool suppressEnhancedNavigation)
595595 {
596596 // Verify the same form element is still in the page
597597 // We wouldn't be allowed to read the attribute if the element is stale
598- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
598+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
599599 }
600600 }
601601
@@ -644,7 +644,7 @@ public void CanDisplayBindingErrorsCollectionsToDefaultForm(bool suppressEnhance
644644 {
645645 // Verify the same form element is still in the page
646646 // We wouldn't be allowed to read the attribute if the element is stale
647- Assert . NotEmpty ( form . GetAttribute ( "action" ) ) ;
647+ Assert . NotEmpty ( form . GetDomAttribute ( "action" ) ) ;
648648 }
649649 }
650650
@@ -670,7 +670,7 @@ public void CanHandleBindingErrorsBindParameterToNamedForm(bool suppressEnhanced
670670 {
671671 Assert . Equal ( "The value 'abc' is not valid for 'Parameter'." , error . Text ) ;
672672 } ) ;
673- Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetAttribute ( "value" ) ) ;
673+ Assert . Equal ( "abc" , Browser . FindElement ( By . CssSelector ( "input[name=Parameter]" ) ) . GetDomProperty ( "value" ) ) ;
674674 }
675675 } ;
676676 DispatchToFormCore ( dispatchToForm ) ;
@@ -977,14 +977,14 @@ public void CanUsePlainForm(bool suppressEnhancedNavigation)
977977 Browser . Exists ( By . Id ( "send" ) ) . Click ( ) ;
978978 Browser . Exists ( By . Id ( "pass" ) ) ;
979979
980- Browser . Equal ( "StringViaExplicitPropertyName value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExplicitPropertyName input" ) ) . GetAttribute ( "value" ) ) ;
981- Browser . Equal ( "StringViaOverriddenName value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaOverriddenName input" ) ) . GetAttribute ( "value" ) ) ;
982- Browser . Equal ( /* should not match */ "" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaOverriddenNameUnmatched input" ) ) . GetAttribute ( "value" ) ) ;
983- Browser . Equal ( "StringViaExpression value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpression input" ) ) . GetAttribute ( "value" ) ) ;
984- Browser . Equal ( "StringViaExpressionWithHandler value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpressionWithHandler input" ) ) . GetAttribute ( "value" ) ) ;
985- Browser . Equal ( /* should not match */ "" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpressionWithUnmatchedHandler input" ) ) . GetAttribute ( "value" ) ) ;
986- Browser . Equal ( "PersonName value" , ( ) => Browser . Exists ( By . CssSelector ( "#PersonName input" ) ) . GetAttribute ( "value" ) ) ;
987- Browser . Equal ( "123" , ( ) => Browser . Exists ( By . CssSelector ( "#PersonAge input" ) ) . GetAttribute ( "value" ) ) ;
980+ Browser . Equal ( "StringViaExplicitPropertyName value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExplicitPropertyName input" ) ) . GetDomProperty ( "value" ) ) ;
981+ Browser . Equal ( "StringViaOverriddenName value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaOverriddenName input" ) ) . GetDomProperty ( "value" ) ) ;
982+ Browser . Equal ( /* should not match */ "" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaOverriddenNameUnmatched input" ) ) . GetDomProperty ( "value" ) ) ;
983+ Browser . Equal ( "StringViaExpression value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpression input" ) ) . GetDomProperty ( "value" ) ) ;
984+ Browser . Equal ( "StringViaExpressionWithHandler value" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpressionWithHandler input" ) ) . GetDomProperty ( "value" ) ) ;
985+ Browser . Equal ( /* should not match */ "" , ( ) => Browser . Exists ( By . CssSelector ( "#StringViaExpressionWithUnmatchedHandler input" ) ) . GetDomProperty ( "value" ) ) ;
986+ Browser . Equal ( "PersonName value" , ( ) => Browser . Exists ( By . CssSelector ( "#PersonName input" ) ) . GetDomProperty ( "value" ) ) ;
987+ Browser . Equal ( "123" , ( ) => Browser . Exists ( By . CssSelector ( "#PersonAge input" ) ) . GetDomProperty ( "value" ) ) ;
988988 }
989989
990990 [ Fact ]
@@ -1159,15 +1159,15 @@ public void CanMutateDataSuppliedFromForm(bool suppressEnhancedNavigation)
11591159 // Remember that the rendercount would be reset to zero since this is SSR, so
11601160 // receiving 2 here shows we did render twice on this cycle
11611161 Browser . Exists ( By . Id ( "mutate-and-notify" ) ) . Click ( ) ;
1162- Browser . Equal ( "Abc Modified" , ( ) => Browser . Exists ( By . Id ( "simple-value" ) ) . GetAttribute ( "value" ) ) ;
1163- Browser . Equal ( "Def Modified" , ( ) => Browser . Exists ( By . Id ( "complex-value" ) ) . GetAttribute ( "value" ) ) ;
1162+ Browser . Equal ( "Abc Modified" , ( ) => Browser . Exists ( By . Id ( "simple-value" ) ) . GetDomProperty ( "value" ) ) ;
1163+ Browser . Equal ( "Def Modified" , ( ) => Browser . Exists ( By . Id ( "complex-value" ) ) . GetDomProperty ( "value" ) ) ;
11641164 Browser . Equal ( "2" , ( ) => Browser . Exists ( By . Id ( "render-count" ) ) . Text ) ;
11651165 Browser . Exists ( By . Id ( "received-notification" ) ) ;
11661166
11671167 // Can perform a submit that replaces the received object entirely
11681168 Browser . Exists ( By . Id ( "clear-and-notify" ) ) . Click ( ) ;
1169- Browser . Equal ( "" , ( ) => Browser . Exists ( By . Id ( "simple-value" ) ) . GetAttribute ( "value" ) ) ;
1170- Browser . Equal ( "" , ( ) => Browser . Exists ( By . Id ( "complex-value" ) ) . GetAttribute ( "value" ) ) ;
1169+ Browser . Equal ( "" , ( ) => Browser . Exists ( By . Id ( "simple-value" ) ) . GetDomProperty ( "value" ) ) ;
1170+ Browser . Equal ( "" , ( ) => Browser . Exists ( By . Id ( "complex-value" ) ) . GetDomProperty ( "value" ) ) ;
11711171 Browser . Equal ( "2" , ( ) => Browser . Exists ( By . Id ( "render-count" ) ) . Text ) ;
11721172 Browser . Exists ( By . Id ( "received-notification" ) ) ;
11731173 }
@@ -1495,14 +1495,14 @@ public void EnhancedFormThatCallsNavigationManagerRefreshDoesNotPushHistoryEntry
14951495
14961496 // Submit the form
14971497 Browser . FindElement ( By . Id ( "some-text" ) ) . SendKeys ( "test string" ) ;
1498- Browser . Equal ( "test string" , ( ) => Browser . FindElement ( By . Id ( "some-text" ) ) . GetAttribute ( "value" ) ) ;
1498+ Browser . Equal ( "test string" , ( ) => Browser . FindElement ( By . Id ( "some-text" ) ) . GetDomProperty ( "value" ) ) ;
14991499 Browser . Exists ( By . Id ( "submit-button" ) ) . Click ( ) ;
15001500
15011501 // Wait for the async/streaming process to complete. We know this happened
15021502 // if the loading indicator says we're done, and the textbox was cleared
15031503 // due to the refresh
15041504 Browser . Equal ( "False" , ( ) => Browser . FindElement ( By . Id ( "loading-indicator" ) ) . Text ) ;
1505- Browser . Equal ( "" , ( ) => Browser . FindElement ( By . Id ( "some-text" ) ) . GetAttribute ( "value" ) ) ;
1505+ Browser . Equal ( "" , ( ) => Browser . FindElement ( By . Id ( "some-text" ) ) . GetDomProperty ( "value" ) ) ;
15061506
15071507 // Checking that the history entry was not pushed
15081508 Browser . Navigate ( ) . Back ( ) ;
@@ -1532,7 +1532,7 @@ private void DispatchToFormCore(DispatchToForm dispatch)
15321532 if ( dispatch . ExpectedHandlerValue != null )
15331533 {
15341534 var handlerInput = form . FindElement ( By . CssSelector ( "input[type=hidden][name=_handler]" ) ) ;
1535- Assert . Equal ( dispatch . ExpectedHandlerValue , handlerInput . GetAttribute ( "value" ) ) ;
1535+ Assert . Equal ( dispatch . ExpectedHandlerValue , handlerInput . GetDomProperty ( "value" ) ) ;
15361536 }
15371537
15381538 if ( ! dispatch . DispatchEvent )
@@ -1598,7 +1598,7 @@ private void DispatchToFormCore(DispatchToForm dispatch)
15981598 {
15991599 // Verify the same form element is still in the page
16001600 // We wouldn't be allowed to read the attribute if the element is stale
1601- Assert . Equal ( "post" , form . GetAttribute ( "method" ) ) ;
1601+ Assert . Equal ( "post" , form . GetDomAttribute ( "method" ) , ignoreCase : true ) ;
16021602 }
16031603 }
16041604 }
0 commit comments