-
Notifications
You must be signed in to change notification settings - Fork 0
GetAttribute.cs
Gets the value of an attribute of an element specified by a selector on a page.
-
selector
: Astring
value representing a selector for the element. -
attributeName
: Astring
value representing the name of the attribute to get the value of. -
lockToLastPage
: Abool
value indicating whether to lock to the last page. Default isfalse
.
A string
value representing the value of the specified attribute.
This method first calls the FindElement
method passing selector
and lockToLastPage
parameters to locate the element on the page. It then calls the GetAttributeAsync
method of the located IElementHandle
object with attributeName
to get the value of the specified attribute. The method blocks until the value has been successfully retrieved before returning the string
value representing the value of the attribute. The Log
class is used to write an information message to the log indicating that the attribute value has been retrieved.
Gets the value of an attribute of an IElementHandle
object.
-
element
: AnIElementHandle
object representing the element to get the attribute value of. -
attributeName
: Astring
value representing the name of the attribute to get the value of.
A string
value representing the value of the specified attribute.
This method calls the GetAttributeAsync
method of the provided IElementHandle
object with attributeName
to get the value of the specified attribute. The method blocks until the value has been successfully retrieved before returning the string
value representing the value of the attribute. The Log
class is used to write an information message to the log indicating that the attribute value has been retrieved.