| external help file | Pup.dll-Help.xml |
|---|---|
| Module Name | Pup |
| online version | |
| schema | 2.0.0 |
Clicks on an element.
Invoke-PupElementClick -Element <PupElement> [-ClickCount <Int32>] [-DoubleClick] [-WaitForLoad]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Simulates a mouse click on the specified element. The element is scrolled into view if necessary.
$btn = Find-PupElements -Page $page -Selector "#submit" -First
$btn | Invoke-PupElementClick
Finds and clicks the submit button.
$link = Find-PupElements -Page $page -Selector "a.admin-link" -First
$link | Invoke-PupElementClick
Start-Sleep -Seconds 2 # Wait for navigation
Clicks a link and waits for the page to load.
Number of clicks (2 for double-click)
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePerform a double-click
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseElement to click
Type: PupElement
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: FalseWait for page to load after click (useful for links)
Type: SwitchParameter
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.