| external help file | Pup.dll-Help.xml |
|---|---|
| Module Name | Pup |
| online version | |
| schema | 2.0.0 |
Sets localStorage or sessionStorage data on a page.
Set-PupStorage -Page <PupPage> [-Type <String>] [-Key <String>] [-Value <String>] [-Items <Hashtable>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Stores data in the browser's localStorage or sessionStorage. Can set individual keys or multiple key-value pairs at once.
Set-PupStorage -Page $page -Type Local -Key "theme" -Value "dark"
Sets a single localStorage value.
Set-PupStorage -Page $page -Type Local -Key "authToken" -Value "eyJhbGc..."
Invoke-PupPageReload -Page $page -WaitForLoad
Injects an authentication token and reloads to test access.
Set-PupStorage -Page $page -Type Session -Items @{
"userId" = "admin"
"role" = "administrator"
}
Sets multiple sessionStorage values at once.
Hashtable of key/value pairs to set
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseKey to set
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe page to set storage on
Type: PupPage
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, 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: FalseStorage type: Local or Session (default: Local)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseValue to set
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.