|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.uispec4j.interception.BasicHandler
public class BasicHandler
Ready-to-use window interception handler, designed for simple dialogs.
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| Method Summary | |
|---|---|
BasicHandler |
assertContainsText(java.lang.String text)
Checks that there is a text component in the dialog displaying the given text. |
BasicHandler |
assertTitleContains(java.lang.String expectedTitle)
Checks the displayed title contains the given text. |
BasicHandler |
assertTitleEquals(java.lang.String expectedTitle)
Checks the displayed title is the same as the given text. |
BasicHandler |
clickButton(java.lang.String buttonName)
Clicks on a button given its displayed label. |
static BasicHandler |
init()
Starts the definition of the handler. |
BasicHandler |
setText(java.lang.String text)
Enters a text value, provided that there is only one input text field in the dialog. |
WindowHandler |
triggerButtonClick(java.lang.String buttonName)
Returns the created window handler with a trigger for clicking on a button. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BasicHandler init()
public BasicHandler assertContainsText(java.lang.String text)
public BasicHandler assertTitleEquals(java.lang.String expectedTitle)
public BasicHandler assertTitleContains(java.lang.String expectedTitle)
public BasicHandler clickButton(java.lang.String buttonName)
public BasicHandler setText(java.lang.String text)
public WindowHandler triggerButtonClick(java.lang.String buttonName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||