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 11[System.Reflection.Assembly ]::LoadFrom(" $PSScriptRoot \assemblies\WebDriver.dll" )
22[System.Reflection.Assembly ]::LoadFrom(" $PSScriptRoot \assemblies\WebDriver.Support.dll" )
3+
34function Start-SeChrome {
45 New-Object - TypeName " OpenQA.Selenium.Chrome.ChromeDriver"
56}
67
8+ function Start-SeIe {
9+ New-Object - TypeName " OpenQA.Selenium.IE.InternetExplorerDriver"
10+ }
11+
712function Start-SeFirefox {
813 param ([Switch ]$Profile )
914
@@ -51,7 +56,9 @@ function Find-SeElement {
5156 [Parameter (ParameterSetName = " ByTagName" )]
5257 $TagName ,
5358 [Parameter (ParameterSetName = " ByXPath" )]
54- $XPath )
59+ $XPath ,
60+ [Parameter (ParameterSetName = " ByCssSelector" )]
61+ $Css )
5562
5663 Process {
5764
@@ -91,6 +98,10 @@ function Find-SeElement {
9198 if ($PSCmdlet.ParameterSetName -eq " ByXPath" ) {
9299 $Target.FindElements ([OpenQA.Selenium.By ]::XPath($XPath ))
93100 }
101+
102+ if ($PSCmdlet.ParameterSetName -eq " ByCss" ) {
103+ $Target.FindElements ([OpenQA.Selenium.By ]::CssSelector($Css ))
104+ }
94105 }
95106}
96107
@@ -110,7 +121,6 @@ function Invoke-SeClick {
110121 $Element.Click ()
111122 }
112123
113-
114124}
115125
116126function Send-SeKeys {
You can’t perform that action at this time.
0 commit comments