Skip to content

Commit 85509a9

Browse files
authored
Feature/se location doc update (#105)
* Build fix Since Using statements are used in the init.ps1 file, we need to make sure this is the first file added to the output psm1 so using statements get at the top. * documentation / output update * doc. update * Update ChangeLog.md
1 parent 6f958da commit 85509a9

File tree

12 files changed

+946
-419
lines changed

12 files changed

+946
-419
lines changed

ChangeLog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@
66

77
- Added Markdown documentation (See Help subfolder) for all the cmdlets (PlatyPS is used behind the scene to maintain it)
88
- Added MAML embedded help that can be accessed through `Get-Help`(eg: `Get-Help Start-SeChrome -Examples`)
9+
- Added Get-SeUrl / Pop-SeUrl / Push-SeUrl / Set-SeUrl (Thanks @vexx32)
10+
11+
## Changed
12+
- Converted monolythic module into a scaffolded module through a Plaster template. Module will now have a debug version and a compiled version that need to be built with Invoke-Build. See the Debug folder for additional informations on how to debug.
13+
14+
- Open-SeUrl removed in favor of Set-SeUrl
915

1016
# 3.0.0 - 3/31/2020
1117

1218
## Changed
1319

1420
- Fixed issue with importing module in PSv5.1 - https://github.com/adamdriscoll/selenium-powershell/issues/69
1521
- Updated Chrome drivers
16-
- Converted monolythic module into a scaffolded module through a Plaster template. Module will now have a debug version and a compiled version that need to be built with Invoke-Build. See the Debug folder for additional informations on how to debug.
1722

1823
# 3.0.0-beta2 - 1/29/2020
1924

Help/Get-SeUrl.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
external help file: Selenium-help.xml
3+
Module Name: Selenium
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Get-SeUrl
9+
10+
## SYNOPSIS
11+
Retrieves the current URL of a target webdriver instance.
12+
13+
## SYNTAX
14+
15+
```
16+
Get-SeUrl [-Stack] [[-Target] <Object>] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
Retrieves the current URL of a target webdriver instance, or the currently
21+
stored internal location stack.
22+
23+
## EXAMPLES
24+
25+
### EXAMPLE 1
26+
```
27+
Get-SeUrl
28+
```
29+
30+
Retrieves the current URL of the default webdriver instance.
31+
32+
## PARAMETERS
33+
34+
### -Stack
35+
Optionally retrieve the stored URL stack for the target or default
36+
webdriver instance.
37+
38+
```yaml
39+
Type: SwitchParameter
40+
Parameter Sets: (All)
41+
Aliases:
42+
43+
Required: False
44+
Position: Named
45+
Default value: False
46+
Accept pipeline input: False
47+
Accept wildcard characters: False
48+
```
49+
50+
### -Target
51+
The webdriver instance for which to retrieve the current URL or
52+
internal URL stack.
53+
54+
```yaml
55+
Type: Object
56+
Parameter Sets: (All)
57+
Aliases: Driver
58+
59+
Required: False
60+
Position: 1
61+
Default value: $Global:SeDriver
62+
Accept pipeline input: True (ByValue)
63+
Accept wildcard characters: False
64+
```
65+
66+
### CommonParameters
67+
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).
68+
69+
## INPUTS
70+
71+
## OUTPUTS
72+
73+
## NOTES
74+
When using -Stack, the retrieved stack will not contain any of the driver's
75+
history (Back/Forward) data.
76+
It only handles locations added with
77+
Push-SeUrl.
78+
79+
To utilise a driver's Back/Forward functionality, instead use Set-SeUrl.
80+
81+
## RELATED LINKS

Help/Open-SeUrl.md

Lines changed: 0 additions & 141 deletions
This file was deleted.

Help/Pop-SeUrl.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
external help file: Selenium-help.xml
3+
Module Name: Selenium
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Pop-SeUrl
9+
10+
## SYNOPSIS
11+
Navigate back to the most recently pushed URL in the location stack.
12+
13+
## SYNTAX
14+
15+
```
16+
Pop-SeUrl [[-Target] <Object>] [<CommonParameters>]
17+
```
18+
19+
## DESCRIPTION
20+
Retrieves the most recently pushed URL from the location stack and navigates
21+
to that URL with the specified or default driver.
22+
23+
## EXAMPLES
24+
25+
### EXAMPLE 1
26+
```
27+
Pop-SeUrl
28+
```
29+
30+
Retrieves the most recently pushed URL and navigates back to that URL.
31+
32+
## PARAMETERS
33+
34+
### -Target
35+
{{ Fill Target Description }}
36+
37+
```yaml
38+
Type: Object
39+
Parameter Sets: (All)
40+
Aliases: Driver
41+
42+
Required: False
43+
Position: 1
44+
Default value: $Global:SeDriver
45+
Accept pipeline input: True (ByValue)
46+
Accept wildcard characters: False
47+
```
48+
49+
### CommonParameters
50+
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).
51+
52+
## INPUTS
53+
54+
## OUTPUTS
55+
56+
## NOTES
57+
A separate internal location stack is maintained for each driver instance
58+
by the module.
59+
This stack is completely separate from the driver's internal
60+
Back/Forward history logic.
61+
62+
To utilise a driver's Back/Forward functionality, instead use Set-SeUrl.
63+
64+
## RELATED LINKS

Help/Push-SeUrl.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
external help file: Selenium-help.xml
3+
Module Name: Selenium
4+
online version:
5+
schema: 2.0.0
6+
---
7+
8+
# Push-SeUrl
9+
10+
## SYNOPSIS
11+
Stores the current URL in the driver's location stack and optionally
12+
navigate to a new URL.
13+
14+
## SYNTAX
15+
16+
```
17+
Push-SeUrl [[-Url] <String>] [-Target <Object>] [<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
The current driver URL is added to the stack, and if a URL is provided, the
22+
driver navigates to the new URL.
23+
24+
## EXAMPLES
25+
26+
### EXAMPLE 1
27+
```
28+
Push-SeUrl
29+
```
30+
31+
The current driver URL is added to the location stack.
32+
33+
### EXAMPLE 2
34+
```
35+
Push-SeUrl 'https://google.com/'
36+
```
37+
38+
The current driver URL is added to the location stack, and the driver then
39+
navigates to the provided target URL.
40+
41+
## PARAMETERS
42+
43+
### -Url
44+
The new URL to navigate to after storing the current location.
45+
46+
```yaml
47+
Type: String
48+
Parameter Sets: (All)
49+
Aliases:
50+
51+
Required: False
52+
Position: 1
53+
Default value: None
54+
Accept pipeline input: False
55+
Accept wildcard characters: False
56+
```
57+
58+
### -Target
59+
The webdriver instance that owns the url stack, and will navigate to
60+
a provided new url (if any).
61+
62+
```yaml
63+
Type: Object
64+
Parameter Sets: (All)
65+
Aliases: Driver
66+
67+
Required: False
68+
Position: Named
69+
Default value: $Global:SeDriver
70+
Accept pipeline input: True (ByValue)
71+
Accept wildcard characters: False
72+
```
73+
74+
### CommonParameters
75+
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).
76+
77+
## INPUTS
78+
79+
## OUTPUTS
80+
81+
## NOTES
82+
A separate internal location stack is maintained for each driver instance
83+
by the module.
84+
This stack is completely separate from the driver's internal
85+
Back/Forward history logic.
86+
87+
To utilise a driver's Back/Forward functionality, instead use Set-SeUrl.
88+
89+
## RELATED LINKS

0 commit comments

Comments
 (0)