public class SLRichTextBox extends SLBase
| Modifier | Constructor and Description |
|---|---|
protected |
SLRichTextBox(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 SLRichTextBox。
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
删除文本框中的所有文本。
|
String |
getSelectedText()
获取 所选文本。
|
String |
getText()
获取 文本框中显示的文本。
|
void |
setPosition(int position)
设置文本框中的插入点。
|
void |
setSelection(int startPosition,
int length)
选择文本框中的一系列文本。
|
void |
setText(String 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, typePasswordKeyscaptureBitmap, 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, waitForPropertyequals, 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, toStringprotected SLRichTextBox(JtfObjectHandle handle, Desktop desktop)
handle - 可确定 SLRichTextBox 的句柄desktop - 此对象所在的桌面public void clear()
public void setPosition(int position)
position - 文本框中脱字号的位置。. The value is zero-based.public void setSelection(int startPosition,
int length)
startPosition - 选定内容的开始索引. The value is zero-based.length - 可从开始位置选择的字符的数量public void setText(String text)
text - 新文本public String getSelectedText()
如果选定内容包含非文本元素,例如图像,则这些元素表示为空白字符
public String getText()
如果文本框包含非文本元素,例如图像,则这些元素表示为空白字符
getText in class TestObjectCopyright 2009-2012 Micro Focus. All Rights Reserved.