You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's so many aliases in the module.
It might seems like it is convenient at first, but it create a situation where you can write the same thing in many different ways
Let's take for example Get-SeElement
Get-SeElement -By Name -Selection 'loginfmt'
Now, all the lines below are valid way to call the same statement.
Selection alias
#All aliases for selection
#[Alias("CssSelector", "Name", "Id", "ClassName", "LinkText", "PartialLinkText", "TagName", "XPath")]
Get-SeElement -By Name -name 'loginfmt'
Get-SeElement -By Name -CssSelector 'loginfmt'
Get-SeElement -By Name -LinkText 'loginfmt'
Target alias
#[Alias('Element', 'Driver')]
Get-SeElement -By Name -Selection 'loginfmt' -Target $Driver
Get-SeElement -By Name -Selection 'loginfmt' -Element $Driver
Get-SeElement -By Name -Selection 'loginfmt' -Driver $Driver
Function aliases
Find-SeElement -By Name -Selection 'loginfmt' -Driver $Driver
SeElement -By Name -Selection 'loginfmt' -Driver $Driver
Ultimately, all these are valid way to get to the same thing.
Now let's combine theses
Agreed. Part of this looks like it was introduced to retain some semblance of compatibility with older versions of the module, but just like I noted in #74, it's significantly more confusing than it is really helpful.
Added internal Format-SeElement function intended to be used with anything that must return Iwebelement. The function add a default memeber set to be displayed so whenever you have IwebElement returned, they are formatted neatly on screen (#115). Also, removed Element alias on Get-SeElement (#99) and instead created a separated parameter set.
Added internal Format-SeElement function intended to be used with anything that must return Iwebelement. The function add a default memeber set to be displayed so whenever you have IwebElement returned, they are formatted neatly on screen (#115). Also, removed Element alias on Get-SeElement (#99) and instead created a separated parameter set.
There's so many aliases in the module.
It might seems like it is convenient at first, but it create a situation where you can write the same thing in many different ways
Let's take for example
Get-SeElement
Get-SeElement -By Name -Selection 'loginfmt'
Now, all the lines below are valid way to call the same statement.
Selection alias
Target alias
Function aliases
Ultimately, all these are valid way to get to the same thing.
Now let's combine theses
I think all theses aliases bring more confusion than they bring ease of use.
The text was updated successfully, but these errors were encountered: