Skip to content

Commit bb1016b

Browse files
committed
#178 Get-SeInput
1 parent b5962a7 commit bb1016b

File tree

7 files changed

+425
-2
lines changed

7 files changed

+425
-2
lines changed

Help/Get-SeInput.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
external help file: Selenium-help.xml
3+
Module Name: Selenium
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-SeInput
9+
10+
## SYNOPSIS
11+
Get element with an input tagname matching the specified conditions.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-SeInput [[-Type] <String>] [-Single] [[-Text] <String>] [[-Timeout] <Double>] [-All]
17+
[[-Attributes] <String[]>] [[-Value] <String>] [<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
Get SeElement with an input Tagname
22+
23+
## EXAMPLES
24+
25+
### Example 1
26+
```powershell
27+
PS C:\> Get-SeInput -Attributes placeholder,title -All -Single -Value 'Type to search'
28+
```
29+
30+
Get all the input (including hidden) present in the Dom and load the attributes placeholder and title. A single value is expected and it's attribute placeholder should be equals to : "Type to search"
31+
32+
## PARAMETERS
33+
34+
### -All
35+
Return matching hidden items in addition to displayed ones.
36+
37+
```yaml
38+
Type: SwitchParameter
39+
Parameter Sets: (All)
40+
Aliases:
41+
42+
Required: False
43+
Position: Named
44+
Default value: None
45+
Accept pipeline input: False
46+
Accept wildcard characters: False
47+
```
48+
49+
### -Attributes
50+
Append a list of Attributes (case sensitive) to each element returned. Attributes will be available through a dictionary property of the same name. Is the wildcard `*` character is used, all attributes will be queried and appended.
51+
52+
```yaml
53+
Type: String[]
54+
Parameter Sets: (All)
55+
Aliases:
56+
57+
Required: False
58+
Position: 3
59+
Default value: None
60+
Accept pipeline input: False
61+
Accept wildcard characters: False
62+
```
63+
64+
### -Single
65+
Expectation that only one element will be returned. An error will be returned if that parameter is set and more than one corresponding element is found.
66+
67+
```yaml
68+
Type: SwitchParameter
69+
Parameter Sets: (All)
70+
Aliases:
71+
72+
Required: False
73+
Position: Named
74+
Default value: None
75+
Accept pipeline input: False
76+
Accept wildcard characters: False
77+
```
78+
79+
### -Text
80+
Text of the input to return
81+
82+
```yaml
83+
Type: String
84+
Parameter Sets: (All)
85+
Aliases:
86+
87+
Required: False
88+
Position: 1
89+
Default value: None
90+
Accept pipeline input: False
91+
Accept wildcard characters: False
92+
```
93+
94+
### -Timeout
95+
Timeout (in seconds)
96+
97+
```yaml
98+
Type: Double
99+
Parameter Sets: (All)
100+
Aliases:
101+
102+
Required: False
103+
Position: 2
104+
Default value: None
105+
Accept pipeline input: False
106+
Accept wildcard characters: False
107+
```
108+
109+
### -Type
110+
Type of the input
111+
112+
```yaml
113+
Type: String
114+
Parameter Sets: (All)
115+
Aliases:
116+
117+
Required: False
118+
Position: 0
119+
Default value: None
120+
Accept pipeline input: False
121+
Accept wildcard characters: False
122+
```
123+
124+
### -Value
125+
Expected value of the first attribute present.
126+
127+
```yaml
128+
Type: String
129+
Parameter Sets: (All)
130+
Aliases:
131+
132+
Required: False
133+
Position: 4
134+
Default value: None
135+
Accept pipeline input: False
136+
Accept wildcard characters: False
137+
```
138+
139+
### CommonParameters
140+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
141+
142+
## INPUTS
143+
144+
### None
145+
146+
## OUTPUTS
147+
148+
### System.Object
149+
## NOTES
150+
151+
## RELATED LINKS

Help/README.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Get CSS value for the specified name of targeted element.
4242
### [Get-SeHtml](Get-SeHtml.md)
4343
Get outer html of the specified element or driver.
4444

45+
### [Get-SeInput](Get-SeInput.md)
46+
Get element with an input tagname matching the specified conditions.
47+
4548
### [Get-SeKeys](Get-SeKeys.md)
4649
Return a list of the available special keys
4750

Output/Selenium/Selenium.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ScriptsToProcess = @('SeleniumClasses.ps1')
1818
RootModule = 'Selenium.psm1'
1919
RequiredAssemblies = @('./assemblies/WebDriver.dll', './assemblies/WebDriver.Support.dll', 'System.Drawing')
20-
FunctionsToExport = @('Clear-SeAlert', 'Clear-SeSelectValue', 'Get-SeCookie', 'Get-SeDriver', 'Get-SeDriverTimeout', 'Get-SeElement', 'Get-SeElementAttribute', 'Get-SeElementCssValue', 'Get-SeFrame', 'Get-SeHtml', 'Get-SeKeys', 'Get-SeSelectValue', 'Get-SeUrl', 'Get-SeWindow', 'Invoke-SeClick', 'Invoke-SeJavascript', 'Invoke-SeKeys', 'Invoke-seMouseAction', 'New-SeDriverOptions', 'New-SeDriverService', 'New-SeScreenshot', 'New-SeWindow', 'Pop-SeUrl', 'Push-SeUrl', 'Remove-SeCookie', 'Remove-SeWindow', 'Save-SeScreenshot', 'SeShouldHave', 'Set-SeCookie', 'Set-SeDriverTimeout', 'Set-SeSelectValue', 'Set-SeUrl', 'Start-SeDriver', 'Start-SeRemote', 'Stop-SeDriver', 'Switch-SeDriver', 'Switch-SeFrame', 'Switch-SeWindow', 'Update-SeDriver', 'Wait-SeDriver', 'Wait-SeElement')
20+
FunctionsToExport = @('Clear-SeAlert', 'Clear-SeSelectValue', 'Get-SeCookie', 'Get-SeDriver', 'Get-SeDriverTimeout', 'Get-SeElement', 'Get-SeElementAttribute', 'Get-SeElementCssValue', 'Get-SeFrame', 'Get-SeHtml', 'Get-SeInput', 'Get-SeKeys', 'Get-SeSelectValue', 'Get-SeUrl', 'Get-SeWindow', 'Invoke-SeClick', 'Invoke-SeJavascript', 'Invoke-SeKeys', 'Invoke-seMouseAction', 'New-SeDriverOptions', 'New-SeDriverService', 'New-SeScreenshot', 'New-SeWindow', 'Pop-SeUrl', 'Push-SeUrl', 'Remove-SeCookie', 'Remove-SeWindow', 'Save-SeScreenshot', 'SeShouldHave', 'Set-SeCookie', 'Set-SeDriverTimeout', 'Set-SeSelectValue', 'Set-SeUrl', 'Start-SeDriver', 'Start-SeRemote', 'Stop-SeDriver', 'Switch-SeDriver', 'Switch-SeFrame', 'Switch-SeWindow', 'Update-SeDriver', 'Wait-SeDriver', 'Wait-SeElement')
2121
AliasesToExport = @()
2222
CmdletsToExport = @()
2323
VariablesToExport = @()

Output/Selenium/Selenium.psm1

3.71 KB
Binary file not shown.

Output/Selenium/en-US/Selenium-help.xml

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,227 @@ PS C:\&gt; $Element | Get-SeHtml -Inner</dev:code>
12111211
</command:examples>
12121212
<command:relatedLinks />
12131213
</command:command>
1214+
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
1215+
<command:details>
1216+
<command:name>Get-SeInput</command:name>
1217+
<command:verb>Get</command:verb>
1218+
<command:noun>SeInput</command:noun>
1219+
<maml:description>
1220+
<maml:para>Get element with an input tagname matching the specified conditions.</maml:para>
1221+
</maml:description>
1222+
</command:details>
1223+
<maml:description>
1224+
<maml:para>Get SeElement with an input Tagname</maml:para>
1225+
</maml:description>
1226+
<command:syntax>
1227+
<command:syntaxItem>
1228+
<maml:name>Get-SeInput</maml:name>
1229+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
1230+
<maml:name>Type</maml:name>
1231+
<maml:Description>
1232+
<maml:para>Type of the input</maml:para>
1233+
</maml:Description>
1234+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1235+
<dev:type>
1236+
<maml:name>String</maml:name>
1237+
<maml:uri />
1238+
</dev:type>
1239+
<dev:defaultValue>None</dev:defaultValue>
1240+
</command:parameter>
1241+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
1242+
<maml:name>Text</maml:name>
1243+
<maml:Description>
1244+
<maml:para>Text of the input to return</maml:para>
1245+
</maml:Description>
1246+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1247+
<dev:type>
1248+
<maml:name>String</maml:name>
1249+
<maml:uri />
1250+
</dev:type>
1251+
<dev:defaultValue>None</dev:defaultValue>
1252+
</command:parameter>
1253+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
1254+
<maml:name>Timeout</maml:name>
1255+
<maml:Description>
1256+
<maml:para>Timeout (in seconds)</maml:para>
1257+
</maml:Description>
1258+
<command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
1259+
<dev:type>
1260+
<maml:name>Double</maml:name>
1261+
<maml:uri />
1262+
</dev:type>
1263+
<dev:defaultValue>None</dev:defaultValue>
1264+
</command:parameter>
1265+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none">
1266+
<maml:name>Attributes</maml:name>
1267+
<maml:Description>
1268+
<maml:para>Append a list of Attributes (case sensitive) to each element returned. Attributes will be available through a dictionary property of the same name. Is the wildcard `*` character is used, all attributes will be queried and appended.</maml:para>
1269+
</maml:Description>
1270+
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
1271+
<dev:type>
1272+
<maml:name>String[]</maml:name>
1273+
<maml:uri />
1274+
</dev:type>
1275+
<dev:defaultValue>None</dev:defaultValue>
1276+
</command:parameter>
1277+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none">
1278+
<maml:name>Value</maml:name>
1279+
<maml:Description>
1280+
<maml:para>Expected value of the first attribute present.</maml:para>
1281+
</maml:Description>
1282+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1283+
<dev:type>
1284+
<maml:name>String</maml:name>
1285+
<maml:uri />
1286+
</dev:type>
1287+
<dev:defaultValue>None</dev:defaultValue>
1288+
</command:parameter>
1289+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
1290+
<maml:name>All</maml:name>
1291+
<maml:Description>
1292+
<maml:para>Return matching hidden items in addition to displayed ones.</maml:para>
1293+
</maml:Description>
1294+
<dev:type>
1295+
<maml:name>SwitchParameter</maml:name>
1296+
<maml:uri />
1297+
</dev:type>
1298+
<dev:defaultValue>False</dev:defaultValue>
1299+
</command:parameter>
1300+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
1301+
<maml:name>Single</maml:name>
1302+
<maml:Description>
1303+
<maml:para>Expectation that only one element will be returned. An error will be returned if that parameter is set and more than one corresponding element is found.</maml:para>
1304+
</maml:Description>
1305+
<dev:type>
1306+
<maml:name>SwitchParameter</maml:name>
1307+
<maml:uri />
1308+
</dev:type>
1309+
<dev:defaultValue>False</dev:defaultValue>
1310+
</command:parameter>
1311+
</command:syntaxItem>
1312+
</command:syntax>
1313+
<command:parameters>
1314+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
1315+
<maml:name>All</maml:name>
1316+
<maml:Description>
1317+
<maml:para>Return matching hidden items in addition to displayed ones.</maml:para>
1318+
</maml:Description>
1319+
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
1320+
<dev:type>
1321+
<maml:name>SwitchParameter</maml:name>
1322+
<maml:uri />
1323+
</dev:type>
1324+
<dev:defaultValue>False</dev:defaultValue>
1325+
</command:parameter>
1326+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="3" aliases="none">
1327+
<maml:name>Attributes</maml:name>
1328+
<maml:Description>
1329+
<maml:para>Append a list of Attributes (case sensitive) to each element returned. Attributes will be available through a dictionary property of the same name. Is the wildcard `*` character is used, all attributes will be queried and appended.</maml:para>
1330+
</maml:Description>
1331+
<command:parameterValue required="true" variableLength="false">String[]</command:parameterValue>
1332+
<dev:type>
1333+
<maml:name>String[]</maml:name>
1334+
<maml:uri />
1335+
</dev:type>
1336+
<dev:defaultValue>None</dev:defaultValue>
1337+
</command:parameter>
1338+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none">
1339+
<maml:name>Single</maml:name>
1340+
<maml:Description>
1341+
<maml:para>Expectation that only one element will be returned. An error will be returned if that parameter is set and more than one corresponding element is found.</maml:para>
1342+
</maml:Description>
1343+
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
1344+
<dev:type>
1345+
<maml:name>SwitchParameter</maml:name>
1346+
<maml:uri />
1347+
</dev:type>
1348+
<dev:defaultValue>False</dev:defaultValue>
1349+
</command:parameter>
1350+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none">
1351+
<maml:name>Text</maml:name>
1352+
<maml:Description>
1353+
<maml:para>Text of the input to return</maml:para>
1354+
</maml:Description>
1355+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1356+
<dev:type>
1357+
<maml:name>String</maml:name>
1358+
<maml:uri />
1359+
</dev:type>
1360+
<dev:defaultValue>None</dev:defaultValue>
1361+
</command:parameter>
1362+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="2" aliases="none">
1363+
<maml:name>Timeout</maml:name>
1364+
<maml:Description>
1365+
<maml:para>Timeout (in seconds)</maml:para>
1366+
</maml:Description>
1367+
<command:parameterValue required="true" variableLength="false">Double</command:parameterValue>
1368+
<dev:type>
1369+
<maml:name>Double</maml:name>
1370+
<maml:uri />
1371+
</dev:type>
1372+
<dev:defaultValue>None</dev:defaultValue>
1373+
</command:parameter>
1374+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none">
1375+
<maml:name>Type</maml:name>
1376+
<maml:Description>
1377+
<maml:para>Type of the input</maml:para>
1378+
</maml:Description>
1379+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1380+
<dev:type>
1381+
<maml:name>String</maml:name>
1382+
<maml:uri />
1383+
</dev:type>
1384+
<dev:defaultValue>None</dev:defaultValue>
1385+
</command:parameter>
1386+
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="4" aliases="none">
1387+
<maml:name>Value</maml:name>
1388+
<maml:Description>
1389+
<maml:para>Expected value of the first attribute present.</maml:para>
1390+
</maml:Description>
1391+
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
1392+
<dev:type>
1393+
<maml:name>String</maml:name>
1394+
<maml:uri />
1395+
</dev:type>
1396+
<dev:defaultValue>None</dev:defaultValue>
1397+
</command:parameter>
1398+
</command:parameters>
1399+
<command:inputTypes>
1400+
<command:inputType>
1401+
<dev:type>
1402+
<maml:name>None</maml:name>
1403+
</dev:type>
1404+
<maml:description>
1405+
<maml:para></maml:para>
1406+
</maml:description>
1407+
</command:inputType>
1408+
</command:inputTypes>
1409+
<command:returnValues>
1410+
<command:returnValue>
1411+
<dev:type>
1412+
<maml:name>System.Object</maml:name>
1413+
</dev:type>
1414+
<maml:description>
1415+
<maml:para></maml:para>
1416+
</maml:description>
1417+
</command:returnValue>
1418+
</command:returnValues>
1419+
<maml:alertSet>
1420+
<maml:alert>
1421+
<maml:para></maml:para>
1422+
</maml:alert>
1423+
</maml:alertSet>
1424+
<command:examples>
1425+
<command:example>
1426+
<maml:title>-------------------------- Example 1 --------------------------</maml:title>
1427+
<dev:code>PS C:\&gt; Get-SeInput -Attributes placeholder,title -All -Single -Value 'Type to search'</dev:code>
1428+
<dev:remarks>
1429+
<maml:para>Get all the input (including hidden) present in the Dom and load the attributes placeholder and title. A single value is expected and it's attribute placeholder should be equals to : "Type to search"</maml:para>
1430+
</dev:remarks>
1431+
</command:example>
1432+
</command:examples>
1433+
<command:relatedLinks />
1434+
</command:command>
12141435
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
12151436
<command:details>
12161437
<command:name>Get-SeKeys</command:name>

0 commit comments

Comments
 (0)