| external help file | Pup.dll-Help.xml |
|---|---|
| Module Name | Pup |
| online version | |
| schema | 2.0.0 |
Sets the value property of a form element.
Set-PupElementValue -Element <PupElement> [-Value <Object>] [-Values <Object[]>] [-Check] [-Uncheck]
[-NoEvents] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Directly sets the value property of an input element. Faster than typing but doesn't trigger keyboard events.
$input = Find-PupElements -Page $page -Selector "#csrf-token" -First
Set-PupElementValue -Element $input -Value "manipulated_token"
Directly sets the value of a hidden input.
Example 2: Modify hidden fields before submit
$priceField = Find-PupElements -Page $page -Selector "input[name=price]" -First
Set-PupElementValue -Element $priceField -Value "0.01"
$form = Find-PupElements -Page $page -Selector "form" -First
# Submit to test price manipulation
Tests for price manipulation vulnerabilities.
Mark checkbox/radio as checked
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseElement to set
Type: PupElement
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseSkip firing input/change events
Type: SwitchParameter
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: FalseMark checkbox/radio as unchecked
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseValue to set (string/number/bool or array for multi-select)
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseValues for multi-select elements
Type: Object[]
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.