Modifier and Type | Field and Description |
---|---|
MouseButton |
button
Defaults to
left . |
Integer |
clickCount
defaults to 1.
|
Double |
delay
Time to wait between
mousedown and mouseup in milliseconds. |
Boolean |
force
Whether to bypass the actionability checks.
|
List<KeyboardModifier> |
modifiers
Modifier keys to press.
|
Boolean |
noWaitAfter
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading.
|
Position |
position
A point to use relative to the top-left corner of element padding box.
|
Boolean |
strict
When true, the call requires selector to resolve to a single element.
|
Double |
timeout
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
Boolean |
trial
When set, this method only performs the actionability
checks and skips the action.
|
Constructor and Description |
---|
ClickOptions() |
Modifier and Type | Method and Description |
---|---|
Page.ClickOptions |
setButton(MouseButton button)
Defaults to
left . |
Page.ClickOptions |
setClickCount(int clickCount)
defaults to 1.
|
Page.ClickOptions |
setDelay(double delay)
Time to wait between
mousedown and mouseup in milliseconds. |
Page.ClickOptions |
setForce(boolean force)
Whether to bypass the actionability checks.
|
Page.ClickOptions |
setModifiers(List<KeyboardModifier> modifiers)
Modifier keys to press.
|
Page.ClickOptions |
setNoWaitAfter(boolean noWaitAfter)
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading.
|
Page.ClickOptions |
setPosition(double x,
double y)
A point to use relative to the top-left corner of element padding box.
|
Page.ClickOptions |
setPosition(Position position)
A point to use relative to the top-left corner of element padding box.
|
Page.ClickOptions |
setStrict(boolean strict)
When true, the call requires selector to resolve to a single element.
|
Page.ClickOptions |
setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
Page.ClickOptions |
setTrial(boolean trial)
When set, this method only performs the actionability
checks and skips the action.
|
public MouseButton button
left
.public Integer clickCount
public Double delay
mousedown
and mouseup
in milliseconds. Defaults to 0.public Boolean force
false
.public List<KeyboardModifier> modifiers
public Boolean noWaitAfter
false
.public Position position
public Boolean strict
public Double timeout
0
to disable timeout. The default value can be changed by
using the BrowserContext.setDefaultTimeout()
or Page.setDefaultTimeout()
methods.public Boolean trial
false
. Useful to wait until the element is ready for the action without
performing it.public Page.ClickOptions setButton(MouseButton button)
left
.public Page.ClickOptions setClickCount(int clickCount)
public Page.ClickOptions setDelay(double delay)
mousedown
and mouseup
in milliseconds. Defaults to 0.public Page.ClickOptions setForce(boolean force)
false
.public Page.ClickOptions setModifiers(List<KeyboardModifier> modifiers)
public Page.ClickOptions setNoWaitAfter(boolean noWaitAfter)
false
.public Page.ClickOptions setPosition(double x, double y)
public Page.ClickOptions setPosition(Position position)
public Page.ClickOptions setStrict(boolean strict)
public Page.ClickOptions setTimeout(double timeout)
0
to disable timeout. The default value can be changed by
using the BrowserContext.setDefaultTimeout()
or Page.setDefaultTimeout()
methods.public Page.ClickOptions setTrial(boolean trial)
false
. Useful to wait until the element is ready for the action without
performing it.Copyright © 2022. All rights reserved.