org.xwiki.test.ui.po
Class CommentForm

java.lang.Object
  extended by org.xwiki.test.ui.po.BaseElement
      extended by org.xwiki.test.ui.po.CommentForm

public class CommentForm
extends BaseElement

Represents the form used to add, edit or reply to a comment.

Since:
4.0M1
Version:
$Id: 76ee9b0fe6f0a17db1ca60b6377ed27169110dcf $

Constructor Summary
CommentForm(org.openqa.selenium.By containerLocator)
          Creates a new form instance.
 
Method Summary
 void clickBack()
          Clicks on the back button to cancel the preview and show the content text area
 void clickCancel()
          Clicks on the cancel button.
 org.openqa.selenium.WebElement clickPreview()
          Clicks on the preview button and waits for the preview to be ready.
 void clickSubmit()
          Clicks on the submit button and waits for the operation to take place.
 void clickSubmit(boolean wait)
          Clicks on the submit button and optionally waits for the operation to take place.
 org.openqa.selenium.WebElement getContentField()
           
 
Methods inherited from class org.xwiki.test.ui.po.BaseElement
executeJavascript, getDriver, getUtil, makeAlertDialogSilent, makeConfirmDialogSilent, makeElementVisible, makeElementVisible, setContext, waitForNotificationErrorMessage, waitForNotificationSuccessMessage, waitForNotificationWarningMessage, waitUntilElementDisappears, waitUntilElementEndsWithAttributeValue, waitUntilElementHasAttributeValue, waitUntilElementHasTextContent, waitUntilElementIsVisible, waitUntilElementsAreVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentForm

public CommentForm(org.openqa.selenium.By containerLocator)
Creates a new form instance.

Parameters:
containerLocator - the locator to the form
Method Detail

getContentField

public org.openqa.selenium.WebElement getContentField()
Returns:
the field used to input the comment content

clickPreview

public org.openqa.selenium.WebElement clickPreview()
Clicks on the preview button and waits for the preview to be ready.

Returns:
the element that wraps the content preview

clickBack

public void clickBack()
Clicks on the back button to cancel the preview and show the content text area


clickSubmit

public void clickSubmit()
Clicks on the submit button and waits for the operation to take place. The effect depends on the actual form. It could add a new comment, a reply to an existing comment or update an existing comment.


clickSubmit

public void clickSubmit(boolean wait)
Clicks on the submit button and optionally waits for the operation to take place. The effect depends on the actual form. It could add a new comment, a reply to an existing comment or update an existing comment.

Note: Use this method when JavaScript is disabled and the submit is not done asynchronously.

Parameters:
wait - true to wait for the success notification, false otherwise

clickCancel

public void clickCancel()
Clicks on the cancel button.



Copyright © 2004-2013 XWiki. All Rights Reserved.