public class BasicHandler extends Object
Sample usage:
WindowInterceptor
.init(panel.getButton("Change value").triggerClick())
.process(BasicHandler.init()
.assertContainsText("Enter new value")
.setText("13")
.triggerButtonClick("OK"))
.run();
The last call must be triggerButtonClick(String)
, which returns the created WindowHandler.WindowInterceptor
Modifier and Type | Method and Description |
---|---|
BasicHandler |
assertContainsText(String text)
Checks that there is a text component in the dialog displaying the given text.
|
BasicHandler |
assertTitleContains(String expectedTitle)
Checks the displayed title contains the given text.
|
BasicHandler |
assertTitleEquals(String expectedTitle)
Checks the displayed title is the same as the given text.
|
BasicHandler |
clickButton(String buttonName)
Clicks on a button given its displayed label.
|
static BasicHandler |
init()
Starts the definition of the handler.
|
BasicHandler |
setText(String text)
Enters a text value, provided that there is only one input text field in the dialog.
|
WindowHandler |
triggerButtonClick(String buttonName)
Returns the created window handler with a trigger for clicking on a button.
|
public static BasicHandler init()
public BasicHandler assertContainsText(String text)
public BasicHandler assertTitleEquals(String expectedTitle)
public BasicHandler assertTitleContains(String expectedTitle)
public BasicHandler clickButton(String buttonName)
public BasicHandler setText(String text)
public WindowHandler triggerButtonClick(String buttonName)
Copyright © 2004–2016. All rights reserved.