@@ -1018,13 +1018,13 @@ internal IWebElement GetElementFromResponse(Response response)
1018
1018
// TODO: Remove this "if" logic once the spec is properly updated
1019
1019
// and remote-end implementations comply.
1020
1020
string id = string . Empty ;
1021
- if ( elementDictionary . ContainsKey ( "element-6066-11e4-a52e-4f735466cecf" ) )
1021
+ if ( elementDictionary . ContainsKey ( RemoteWebElement . ElementReferencePropertyName ) )
1022
1022
{
1023
- id = ( string ) elementDictionary [ "element-6066-11e4-a52e-4f735466cecf" ] ;
1023
+ id = ( string ) elementDictionary [ RemoteWebElement . ElementReferencePropertyName ] ;
1024
1024
}
1025
- else if ( elementDictionary . ContainsKey ( "ELEMENT" ) )
1025
+ else if ( elementDictionary . ContainsKey ( RemoteWebElement . LegacyElementReferencePropertyName ) )
1026
1026
{
1027
- id = ( string ) elementDictionary [ "ELEMENT" ] ;
1027
+ id = ( string ) elementDictionary [ RemoteWebElement . LegacyElementReferencePropertyName ] ;
1028
1028
}
1029
1029
1030
1030
element = this . CreateElement ( id ) ;
@@ -1052,13 +1052,13 @@ internal ReadOnlyCollection<IWebElement> GetElementsFromResponse(Response respon
1052
1052
// TODO: Remove this "if" logic once the spec is properly updated
1053
1053
// and remote-end implementations comply.
1054
1054
string id = string . Empty ;
1055
- if ( elementDictionary . ContainsKey ( "element-6066-11e4-a52e-4f735466cecf" ) )
1055
+ if ( elementDictionary . ContainsKey ( RemoteWebElement . ElementReferencePropertyName ) )
1056
1056
{
1057
- id = ( string ) elementDictionary [ "element-6066-11e4-a52e-4f735466cecf" ] ;
1057
+ id = ( string ) elementDictionary [ RemoteWebElement . ElementReferencePropertyName ] ;
1058
1058
}
1059
- else if ( elementDictionary . ContainsKey ( "ELEMENT" ) )
1059
+ else if ( elementDictionary . ContainsKey ( RemoteWebElement . LegacyElementReferencePropertyName ) )
1060
1060
{
1061
- id = ( string ) elementDictionary [ "ELEMENT" ] ;
1061
+ id = ( string ) elementDictionary [ RemoteWebElement . LegacyElementReferencePropertyName ] ;
1062
1062
}
1063
1063
1064
1064
RemoteWebElement element = this . CreateElement ( id ) ;
@@ -1297,7 +1297,7 @@ private static object ConvertObjectToJavaScriptObject(object arg)
1297
1297
{
1298
1298
// TODO: Remove "ELEMENT" addition when all remote ends are spec-compliant.
1299
1299
Dictionary < string , object > elementDictionary = argAsElementReference . ToDictionary ( ) ;
1300
- elementDictionary . Add ( "ELEMENT" , argAsElementReference . ElementReferenceId ) ;
1300
+ elementDictionary . Add ( RemoteWebElement . LegacyElementReferencePropertyName , argAsElementReference . ElementReferenceId ) ;
1301
1301
converted = elementDictionary ;
1302
1302
}
1303
1303
else if ( argAsDictionary != null )
@@ -1474,15 +1474,15 @@ private object ParseJavaScriptReturnValue(object responseValue)
1474
1474
1475
1475
if ( resultAsDictionary != null )
1476
1476
{
1477
- if ( resultAsDictionary . ContainsKey ( "element-6066-11e4-a52e-4f735466cecf" ) )
1477
+ if ( resultAsDictionary . ContainsKey ( RemoteWebElement . ElementReferencePropertyName ) )
1478
1478
{
1479
- string id = ( string ) resultAsDictionary [ "element-6066-11e4-a52e-4f735466cecf" ] ;
1479
+ string id = ( string ) resultAsDictionary [ RemoteWebElement . ElementReferencePropertyName ] ;
1480
1480
RemoteWebElement element = this . CreateElement ( id ) ;
1481
1481
returnValue = element ;
1482
1482
}
1483
- else if ( resultAsDictionary . ContainsKey ( "ELEMENT" ) )
1483
+ else if ( resultAsDictionary . ContainsKey ( RemoteWebElement . LegacyElementReferencePropertyName ) )
1484
1484
{
1485
- string id = ( string ) resultAsDictionary [ "ELEMENT" ] ;
1485
+ string id = ( string ) resultAsDictionary [ RemoteWebElement . LegacyElementReferencePropertyName ] ;
1486
1486
RemoteWebElement element = this . CreateElement ( id ) ;
1487
1487
returnValue = element ;
1488
1488
}
0 commit comments