| external help file | Pup.dll-Help.xml |
|---|---|
| Module Name | Pup |
| online version | |
| schema | 2.0.0 |
Types text into an element or sets its value.
Set-PupElement -Element <PupElement> [-Text <String>] [-Value <String>] [-InnerHTML <String>] [-Clear]
[-Append] [-Focus] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Types text character by character into an input element, or directly sets its value. Can optionally clear existing content first.
$username = Find-PupElements -Page $page -Selector "#username" -First
Set-PupElement -Element $username -Text "admin"
Types "admin" into the username field.
$input = Find-PupElements -Page $page -Selector "#search" -First
Set-PupElement -Element $input -Text "new search" -Clear
Clears existing text and types new content.
$input = Find-PupElements -Page $page -Selector "#token" -First
Set-PupElement -Element $input -Value "injected_value"
Sets the value property directly without typing.
$search = Find-PupElements -Page $page -Selector "#search" -First
Set-PupElement -Element $search -Text "' OR '1'='1" -Clear
$submit = Find-PupElements -Page $page -Selector "#submit" -First
$submit | Invoke-PupElementClick
Enters SQL injection payload into a search field.
Append text instead of replacing existing content
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseClear the element before setting new content
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseElement to modify
Type: PupElement
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseFocus the element after setting values
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSet the innerHTML of the element
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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: FalseSet the text content of the element (clears existing text first unless -Append is used)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSet the value property of the element (for form inputs)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
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.