Closed
Description
One of the thing I noticed I needed to do a lot during my live testing was to query 1 or many attributes after I got my elements returned.
To better deal with this in a swift manner , I came up with -Attributes
When using that parameter, an "Attributes" property will be present on the returned object with the specified attributes loaded.
For instance
$Items = Get-SeElement -By ClassName -Value 'homeitem' -Attributes Name,Type
will populate an Attribute dictionary with all the specified attributes and bind it to the returned IwebremoteElement so it can be retrieved afterward through
$Items.Attributes.Name
$Items | Where {$_.Attributes.Name -eq 'Hello'}
Wildcard characters can also be used to load up all the attributes
Get-SeElement -By ClassName -Value 'homeitem' -Attributes *