@@ -49,7 +49,7 @@ public WebElementFactory(WebDriver parentDriver)
4949 /// </summary>
5050 /// <param name="elementDictionary">The dictionary containing the element reference.</param>
5151 /// <returns>A <see cref="WebElement"/> containing the information from the specified dictionary.</returns>
52- public virtual WebElement CreateElement ( Dictionary < string , object > elementDictionary )
52+ public virtual WebElement CreateElement ( Dictionary < string , object ? > elementDictionary )
5353 {
5454 string elementId = this . GetElementId ( elementDictionary ) ;
5555 return new WebElement ( this . ParentDriver , elementId ) ;
@@ -60,7 +60,7 @@ public virtual WebElement CreateElement(Dictionary<string, object> elementDictio
6060 /// </summary>
6161 /// <param name="elementDictionary">The dictionary to check.</param>
6262 /// <returns><see langword="true"/> if the dictionary contains an element reference; otherwise, <see langword="false"/>.</returns>
63- public bool ContainsElementReference ( Dictionary < string , object > elementDictionary )
63+ public bool ContainsElementReference ( Dictionary < string , object ? > elementDictionary )
6464 {
6565 if ( elementDictionary == null )
6666 {
@@ -78,7 +78,7 @@ public bool ContainsElementReference(Dictionary<string, object> elementDictionar
7878 /// <exception cref="ArgumentNullException">If <paramref name="elementDictionary"/> is <see langword="null"/>.</exception>
7979 /// <exception cref="ArgumentException">If the dictionary does not contain the element reference property name.</exception>
8080 /// <exception cref="InvalidOperationException">If the element property is <see langword="null"/> or <see cref="string.Empty"/>.</exception>
81- public string GetElementId ( Dictionary < string , object > elementDictionary )
81+ public string GetElementId ( Dictionary < string , object ? > elementDictionary )
8282 {
8383 if ( elementDictionary == null )
8484 {
@@ -90,13 +90,13 @@ public string GetElementId(Dictionary<string, object> elementDictionary)
9090 throw new ArgumentException ( "elementDictionary" , "The specified dictionary does not contain an element reference" ) ;
9191 }
9292
93- string ? elementId = elementIdObj . ToString ( ) ;
93+ string ? elementId = elementIdObj ? . ToString ( ) ;
9494 if ( string . IsNullOrEmpty ( elementId ) )
9595 {
9696 throw new InvalidOperationException ( "The specified element ID is either null or the empty string." ) ;
9797 }
9898
99- return elementId ;
99+ return elementId ! ;
100100 }
101101 }
102102}
0 commit comments