version 1.0

com.actimind.actiwate.testing.html
Interface UserDialogExpect

All Known Subinterfaces:
ActiwateSession
All Known Implementing Classes:
ActiwateTestCase

public interface UserDialogExpect

User dialog expectation methods.


Field Summary
static int PRESS_CANCEL
          Cancel button
static int PRESS_OK
          Ok button
 
Method Summary
 void expectAlert(AlertAssert alertAssert, java.lang.String expectedAlertDescription)
          Setups custom alert expectation.
 void expectAlert(java.lang.String expectedText)
          Setups alert expectation with specified text.
 void expectAnyAlert()
          Setups any alert expectation.
 void expectAnyConfirm(int whatToPress)
          Setups any confirmation dialog expectation.
 void expectAnyPrompt(java.lang.String newValue)
          Setups prompt dialog expectation.
 void expectConfirm(ConfirmAssert confirmAssert, java.lang.String expectedConfirmDescription, int whatToPress)
          Setups custom confirmation dialog expectation.
 void expectConfirm(java.lang.String expectedText, int whatToPress)
          Setups confirmation dialog expectation with specified text.
 void expectPrompt(PromptAssert promptAssert, java.lang.String expectedPromptdescription, java.lang.String newValue)
          Setups custom prompt dialog expectation.
 void expectPromptWithText(java.lang.String expectedText, java.lang.String newValue)
          Setups prompt dialog expectation with expected text.
 void expectPromptWithTextAndValue(java.lang.String expectedText, java.lang.String expectedValue, java.lang.String newValue)
          Setups prompt dialog expectation with expected text and initial value.
 void verifyUserDialogs()
          Verifies that all expected user dialogs are occurred.
 

Field Detail

PRESS_OK

public static final int PRESS_OK
Ok button

See Also:
Constant Field Values

PRESS_CANCEL

public static final int PRESS_CANCEL
Cancel button

See Also:
Constant Field Values
Method Detail

expectAnyAlert

public void expectAnyAlert()
Setups any alert expectation.


expectAlert

public void expectAlert(java.lang.String expectedText)
Setups alert expectation with specified text.

Text shown in alert will be normalized before comparing with expectedText argument.

Parameters:
expectedText - text an alert must have

expectAlert

public void expectAlert(AlertAssert alertAssert,
                        java.lang.String expectedAlertDescription)
Setups custom alert expectation.

Parameters:
alertAssert - custom alert assertion implementation making actual assertion.
expectedAlertDescription - Description for an expected alert dialog. This description is shown in logs in case when the expected dialog didn't occur.

expectAnyConfirm

public void expectAnyConfirm(int whatToPress)
Setups any confirmation dialog expectation.

Parameters:
whatToPress - button to press in confirm: either PRESS_OK or PRESS_CANCEL constant must be used.

expectConfirm

public void expectConfirm(java.lang.String expectedText,
                          int whatToPress)
Setups confirmation dialog expectation with specified text.

Parameters:
expectedText - text a confirm must have
whatToPress - button to press in confirm: either PRESS_OK or PRESS_CANCEL constant must be used.

expectConfirm

public void expectConfirm(ConfirmAssert confirmAssert,
                          java.lang.String expectedConfirmDescription,
                          int whatToPress)
Setups custom confirmation dialog expectation.

Parameters:
confirmAssert - custom confirmation assertion implementation making actual assertion
expectedConfirmDescription - Description for an expected confirmation dialog. This description is shown in logs in case when the expected dialog didn't occur.
whatToPress - button to press in confirm: either PRESS_OK or PRESS_CANCEL constant must be used.

expectAnyPrompt

public void expectAnyPrompt(java.lang.String newValue)
Setups prompt dialog expectation.

Parameters:
newValue - value to specify in prompt, if null then prompt will be cancelled

expectPromptWithText

public void expectPromptWithText(java.lang.String expectedText,
                                 java.lang.String newValue)
Setups prompt dialog expectation with expected text.

Parameters:
expectedText - text a prompt must have
newValue - value to specify in prompt, if null then prompt will be cancelled

expectPrompt

public void expectPrompt(PromptAssert promptAssert,
                         java.lang.String expectedPromptdescription,
                         java.lang.String newValue)
Setups custom prompt dialog expectation.

Parameters:
promptAssert - custom prompt assertion implementation making actual assertion
expectedPromptdescription - Description for an expected prompt dialog. This description is shown in logs in case when the expected dialog didn't occur.
newValue - value to specify in prompt, if null then prompt will be cancelled

expectPromptWithTextAndValue

public void expectPromptWithTextAndValue(java.lang.String expectedText,
                                         java.lang.String expectedValue,
                                         java.lang.String newValue)
Setups prompt dialog expectation with expected text and initial value.

Parameters:
expectedText - text a prompt must have
expectedValue - initial value a prompt must have
newValue - value to specify in prompt, if null then prompt will be cancelled

verifyUserDialogs

public void verifyUserDialogs()
                       throws UserDialogExpectedException
Verifies that all expected user dialogs are occurred.

Throws:
UserDialogExpectedException - if not all user dialogs occurred.


Copyright © 2007 Actimind, Inc. All Rights Reserved.