| external help file | Pup.dll-Help.xml |
|---|---|
| Module Name | Pup |
| online version | |
| schema | 2.0.0 |
Sends keyboard input to the page.
Send-PupKey -Page <PupPage> -Key <String> [-Modifiers <String[]>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Send-PupKey -Page <PupPage> -Text <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Simulates keyboard input by pressing keys or typing text. Can combine with modifier keys (Ctrl, Alt, Shift).
$input = Find-PupElements -Page $page -Selector "#search" -First
$input | Invoke-PupElementFocus
Send-PupKey -Page $page -Text "search query"
Types text into the focused element.
Send-PupKey -Page $page -Key "Enter"
Presses the Enter key to submit a form.
Send-PupKey -Page $page -Key "a" -Modifiers "Control"
Sends Ctrl+A to select all.
Send-PupKey -Page $page -Key "Tab"
Send-PupKey -Page $page -Key "Tab"
Send-PupKey -Page $page -Key "Enter"
Uses Tab to navigate form fields.
The key to press (e.g., Enter, Tab, Escape, ArrowUp, Backspace)
Type: String
Parameter Sets: SingleKey
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseModifier keys to hold while pressing the key (e.g., Control, Shift, Alt, Meta)
Type: String[]
Parameter Sets: SingleKey
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe page to send keys to
Type: PupPage
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseText to type character by character
Type: String
Parameter Sets: TypeText
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.