public class SLRichTextBox extends SLBase
Modifier | Constructor and Description |
---|---|
protected |
SLRichTextBox(JtfObjectHandle handle,
Desktop desktop)
Creates a new SLRichTextBox with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all text from the text box.
|
String |
getSelectedText()
Gets the selected text.
|
String |
getText()
Gets the text that is displayed in the text box.
|
void |
setPosition(int position)
Sets the insertion point in the text box.
|
void |
setSelection(int startPosition,
int length)
Selects a range of text in the text box.
|
void |
setText(String text)
Replaces the content in the text box with the given text.
|
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAutomationId, getClassName, getName, getRawChildren, getRawChildren, isEnabled, isFocused, mouseMove, mouseMove, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, setFocus, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected SLRichTextBox(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the SLRichTextBoxdesktop
- the desktop on which this object livespublic void clear()
public void setPosition(int position)
position
- the position of the caret within the text box. The value is zero-based.public void setSelection(int startPosition, int length)
startPosition
- the start index for the selection. The value is zero-based.length
- the number of characters to select from the start positionpublic void setText(String text)
text
- the new textpublic String getSelectedText()
if the selection contains non-text elements, e.g. an image, those elements are represented as blank character
public String getText()
if the text box contains non-text elements, e.g. an image, those elements are represented as blank character
getText
in class TestObject
Copyright 2009-2012 Micro Focus. All Rights Reserved.