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 {
71
71
$ClassName ,
72
72
[Parameter (ParameterSetName = " ByLinkText" )]
73
73
$LinkText ,
74
+ [Parameter (ParameterSetName = " ByPartialLinkText" )]
75
+ $PartialLinkText ,
74
76
[Parameter (ParameterSetName = " ByTagName" )]
75
77
$TagName ,
76
78
[Parameter (ParameterSetName = " ByXPath" )]
77
- $XPath )
79
+ $XPath ,
80
+ [Parameter (ParameterSetName = " ByCss" )]
81
+ $Css
82
+ )
83
+
78
84
79
85
Process {
80
86
@@ -103,6 +109,10 @@ function Find-SeElement {
103
109
$Target.FindElements ([OpenQA.Selenium.By ]::LinkText($LinkText ))
104
110
}
105
111
112
+ if ($PSCmdlet.ParameterSetName -eq " ByPartialLinkText" ) {
113
+ $Target.FindElements ([OpenQA.Selenium.By ]::PartialLinkText($PartialLinkText ))
114
+ }
115
+
106
116
if ($PSCmdlet.ParameterSetName -eq " ByClassName" ) {
107
117
$Target.FindElements ([OpenQA.Selenium.By ]::ClassName($ClassName ))
108
118
}
@@ -114,6 +124,10 @@ function Find-SeElement {
114
124
if ($PSCmdlet.ParameterSetName -eq " ByXPath" ) {
115
125
$Target.FindElements ([OpenQA.Selenium.By ]::XPath($XPath ))
116
126
}
127
+
128
+ if ($PSCmdlet.ParameterSetName -eq " ByCss" ) {
129
+ $Target.FindElements ([OpenQA.Selenium.By ]::CssSelector($Css ))
130
+ }
117
131
}
118
132
}
119
133
You can’t perform that action at this time.
0 commit comments