File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,16 @@ function Find-SeElement {
7171 $ClassName ,
7272 [Parameter (ParameterSetName = " ByLinkText" )]
7373 $LinkText ,
74+ [Parameter (ParameterSetName = " ByPartialLinkText" )]
75+ $PartialLinkText ,
7476 [Parameter (ParameterSetName = " ByTagName" )]
7577 $TagName ,
7678 [Parameter (ParameterSetName = " ByXPath" )]
77- $XPath )
79+ $XPath ,
80+ [Parameter (ParameterSetName = " ByCss" )]
81+ $Css
82+ )
83+
7884
7985 Process {
8086
@@ -103,6 +109,10 @@ function Find-SeElement {
103109 $Target.FindElements ([OpenQA.Selenium.By ]::LinkText($LinkText ))
104110 }
105111
112+ if ($PSCmdlet.ParameterSetName -eq " ByPartialLinkText" ) {
113+ $Target.FindElements ([OpenQA.Selenium.By ]::PartialLinkText($PartialLinkText ))
114+ }
115+
106116 if ($PSCmdlet.ParameterSetName -eq " ByClassName" ) {
107117 $Target.FindElements ([OpenQA.Selenium.By ]::ClassName($ClassName ))
108118 }
@@ -114,6 +124,10 @@ function Find-SeElement {
114124 if ($PSCmdlet.ParameterSetName -eq " ByXPath" ) {
115125 $Target.FindElements ([OpenQA.Selenium.By ]::XPath($XPath ))
116126 }
127+
128+ if ($PSCmdlet.ParameterSetName -eq " ByCss" ) {
129+ $Target.FindElements ([OpenQA.Selenium.By ]::CssSelector($Css ))
130+ }
117131 }
118132}
119133
You can’t perform that action at this time.
0 commit comments