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.
|
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 |
---|---|
Locator.ClickOptions |
setButton(MouseButton button)
Defaults to
left . |
Locator.ClickOptions |
setClickCount(int clickCount)
defaults to 1.
|
Locator.ClickOptions |
setDelay(double delay)
Time to wait between
mousedown and mouseup in milliseconds. |
Locator.ClickOptions |
setForce(boolean force)
Whether to bypass the actionability checks.
|
Locator.ClickOptions |
setModifiers(List<KeyboardModifier> modifiers)
Modifier keys to press.
|
Locator.ClickOptions |
setNoWaitAfter(boolean noWaitAfter)
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading.
|
Locator.ClickOptions |
setPosition(double x,
double y)
A point to use relative to the top-left corner of element padding box.
|
Locator.ClickOptions |
setPosition(Position position)
A point to use relative to the top-left corner of element padding box.
|
Locator.ClickOptions |
setTimeout(double timeout)
Maximum time in milliseconds, defaults to 30 seconds, pass
0 to disable timeout. |
Locator.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 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 Locator.ClickOptions setButton(MouseButton button)
left
.public Locator.ClickOptions setClickCount(int clickCount)
public Locator.ClickOptions setDelay(double delay)
mousedown
and mouseup
in milliseconds. Defaults to 0.public Locator.ClickOptions setForce(boolean force)
false
.public Locator.ClickOptions setModifiers(List<KeyboardModifier> modifiers)
public Locator.ClickOptions setNoWaitAfter(boolean noWaitAfter)
false
.public Locator.ClickOptions setPosition(double x, double y)
public Locator.ClickOptions setPosition(Position position)
public Locator.ClickOptions setTimeout(double timeout)
0
to disable timeout. The default value can be changed by
using the BrowserContext.setDefaultTimeout()
or Page.setDefaultTimeout()
methods.public Locator.ClickOptions setTrial(boolean trial)
false
. Useful to wait until the element is ready for the action without
performing it.Copyright © 2022. All rights reserved.