File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
[System.Reflection.Assembly ]::LoadFrom(" $PSScriptRoot \assemblies\WebDriver.dll" )
2
2
[System.Reflection.Assembly ]::LoadFrom(" $PSScriptRoot \assemblies\WebDriver.Support.dll" )
3
+
3
4
function Start-SeChrome {
4
5
New-Object - TypeName " OpenQA.Selenium.Chrome.ChromeDriver"
5
6
}
6
7
8
+ function Start-SeIe {
9
+ New-Object - TypeName " OpenQA.Selenium.IE.InternetExplorerDriver"
10
+ }
11
+
7
12
function Start-SeFirefox {
8
13
param ([Switch ]$Profile )
9
14
@@ -51,7 +56,9 @@ function Find-SeElement {
51
56
[Parameter (ParameterSetName = " ByTagName" )]
52
57
$TagName ,
53
58
[Parameter (ParameterSetName = " ByXPath" )]
54
- $XPath )
59
+ $XPath ,
60
+ [Parameter (ParameterSetName = " ByCssSelector" )]
61
+ $Css )
55
62
56
63
Process {
57
64
@@ -91,6 +98,10 @@ function Find-SeElement {
91
98
if ($PSCmdlet.ParameterSetName -eq " ByXPath" ) {
92
99
$Target.FindElements ([OpenQA.Selenium.By ]::XPath($XPath ))
93
100
}
101
+
102
+ if ($PSCmdlet.ParameterSetName -eq " ByCss" ) {
103
+ $Target.FindElements ([OpenQA.Selenium.By ]::CssSelector($Css ))
104
+ }
94
105
}
95
106
}
96
107
@@ -110,7 +121,6 @@ function Invoke-SeClick {
110
121
$Element.Click ()
111
122
}
112
123
113
-
114
124
}
115
125
116
126
function Send-SeKeys {
You can’t perform that action at this time.
0 commit comments