File tree Expand file tree Collapse file tree 4 files changed +4
-50
lines changed Expand file tree Collapse file tree 4 files changed +4
-50
lines changed Original file line number Diff line number Diff line change @@ -1563,30 +1563,7 @@ public string GetDomAttribute(string attributeName)
1563
1563
/// <summary>
1564
1564
/// Gets the value of a JavaScript property of this element.
1565
1565
/// </summary>
1566
- /// <param name="propertyName">The name JavaScript the JavaScript property to get the value of.</param>
1567
- /// <returns>The JavaScript property's current value. Returns a <see langword="null"/> if the
1568
- /// value is not set or the property does not exist.</returns>
1569
- [ Obsolete ( "Use the GetDomProperty method instead." ) ]
1570
- public string GetProperty ( string propertyName )
1571
- {
1572
- string elementProperty = string . Empty ;
1573
- try
1574
- {
1575
- elementProperty = this . underlyingElement . GetProperty ( propertyName ) ;
1576
- }
1577
- catch ( Exception ex )
1578
- {
1579
- this . parentDriver . OnException ( new WebDriverExceptionEventArgs ( this . parentDriver , ex ) ) ;
1580
- throw ;
1581
- }
1582
-
1583
- return elementProperty ;
1584
- }
1585
-
1586
- /// <summary>
1587
- /// Gets the value of a JavaScript property of this element.
1588
- /// </summary>
1589
- /// <param name="propertyName">The name JavaScript the JavaScript property to get the value of.</param>
1566
+ /// <param name="propertyName">The name of the JavaScript property to get the value of.</param>
1590
1567
/// <returns>The JavaScript property's current value. Returns a <see langword="null"/> if the
1591
1568
/// value is not set or the property does not exist.</returns>
1592
1569
public string GetDomProperty ( string propertyName )
Original file line number Diff line number Diff line change @@ -188,16 +188,6 @@ public interface IWebElement : ISearchContext
188
188
/// </remarks>
189
189
string GetDomAttribute ( string attributeName ) ;
190
190
191
- /// <summary>
192
- /// Gets the value of a JavaScript property of this element.
193
- /// </summary>
194
- /// <param name="propertyName">The name JavaScript the JavaScript property to get the value of.</param>
195
- /// <returns>The JavaScript property's current value. Returns a <see langword="null"/> if the
196
- /// value is not set or the property does not exist.</returns>
197
- /// <exception cref="StaleElementReferenceException">Thrown when the target element is no longer valid in the document DOM.</exception>
198
- [ Obsolete ( "Use the GetDomProperty method instead." ) ]
199
- string GetProperty ( string propertyName ) ;
200
-
201
191
/// <summary>
202
192
/// Gets the value of a JavaScript property of this element.
203
193
/// </summary>
Original file line number Diff line number Diff line change @@ -468,19 +468,6 @@ public virtual string GetDomAttribute(string attributeName)
468
468
return attributeValue ;
469
469
}
470
470
471
- /// <summary>
472
- /// Gets the value of a JavaScript property of this element.
473
- /// </summary>
474
- /// <param name="propertyName">The name of the JavaScript property to get the value of.</param>
475
- /// <returns>The JavaScript property's current value. Returns a <see langword="null"/> if the
476
- /// value is not set or the property does not exist.</returns>
477
- /// <exception cref="StaleElementReferenceException">Thrown when the target element is no longer valid in the document DOM.</exception>
478
- [ Obsolete ( "Use the GetDomProperty method instead." ) ]
479
- public virtual string GetProperty ( string propertyName )
480
- {
481
- return this . GetDomProperty ( propertyName ) ;
482
- }
483
-
484
471
/// <summary>
485
472
/// Gets the value of a JavaScript property of this element.
486
473
/// </summary>
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public void ShouldReturnNullWhenGettingTheValueOfAPropertyThatIsNotListed()
15
15
{
16
16
driver . Url = simpleTestPage ;
17
17
IWebElement head = driver . FindElement ( By . XPath ( "/html" ) ) ;
18
- string attribute = head . GetProperty ( "cheese" ) ;
18
+ string attribute = head . GetDomProperty ( "cheese" ) ;
19
19
Assert . That ( attribute , Is . Null ) ;
20
20
}
21
21
@@ -25,9 +25,9 @@ public void CanRetrieveTheCurrentValueOfAProperty()
25
25
{
26
26
driver . Url = formsPage ;
27
27
IWebElement element = driver . FindElement ( By . Id ( "working" ) ) ;
28
- Assert . AreEqual ( string . Empty , element . GetProperty ( "value" ) ) ;
28
+ Assert . AreEqual ( string . Empty , element . GetDomProperty ( "value" ) ) ;
29
29
element . SendKeys ( "hello world" ) ;
30
- Assert . AreEqual ( "hello world" , element . GetProperty ( "value" ) ) ;
30
+ Assert . AreEqual ( "hello world" , element . GetDomProperty ( "value" ) ) ;
31
31
}
32
32
}
33
33
}
You can’t perform that action at this time.
0 commit comments