UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

用户界面自动化活动

上次更新日期 2026年4月16日

SetText

在移动自动化可识别的目标用户界面元素中键入指定文本。

定义

命名空间:UiPath.MobileAutomation.API.Models

程序集:UiPath.MobileAutomation.API(在 UiPath.MobileAutomation.API.dll 中)

重载

SetText(IElementDescriptor, string, MobileOptions.SetTextOptions)在目标用户界面元素中键入指定的文本,标识为IElementDescriptor
SetText(ObjectRepositoryTarget, string, MobileOptions.SetTextOptions)在目标用户界面元素中键入指定的文本,标识为ObjectRepositoryTarget
SetText(SelectorTarget, string, MobileOptions.SetTextOptions在目标用户界面元素中键入指定的文本,标识为SelectorTarget

SetText(IElementDescriptor, string, MobileOptions.SetTextOptions)

在目标用户界面元素中键入指定的文本,标识为IElementDescriptor

SetText(
	    IElementDescriptor element,
	    string text,
	    MobileOptions. SetTextOptions options = null
)
SetText(
	    IElementDescriptor element,
	    string text,
	    MobileOptions. SetTextOptions options = null
)

element :对象存储库中使用ObjectRepository.Descriptors类访问的用户界面元素。

Visit [Using objects in coded automations with
Mobile Automation](https://docs.uipath.com/studio/standalone/2024.4/user-guide/creating-an-object-repository#using-objects-in-coded-automations-with-mobile-automation) to learn how to use Object Repository elements
with mobile automation.
Visit [Using objects in coded automations with
Mobile Automation](https://docs.uipath.com/zh-CN/studio/standalone/2024.4/user-guide/creating-an-object-repository#using-objects-in-coded-automations-with-mobile-automation) to learn how to use Object Repository elements
with mobile automation.

text String :要输入到指定用户界面元素的文本,存储在字符串中。

options MobileOptions.SetTextOptions (可选):为设置文本操作指定MobileOptions.SetTextOptions 。默认值为 null。

SetText(ObjectRepositoryTarget, string, MobileOptions.SetTextOptions)

在目标用户界面元素中键入指定的文本,标识为ObjectRepositoryTarget

SetText(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    string text,
	    MobileOptions. SetTextOptions options = null
)
SetText(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    string text,
	    MobileOptions. SetTextOptions options = null
)

objectRepositoryTarget对象存储库目标ObjectRepositoryTarget类型的对象。

text String :要输入到指定用户界面元素的文本,存储在字符串中。

options MobileOptions.SetTextOptions (可选):为设置文本操作指定MobileOptions.SetTextOptions 。默认值为 null。

SetText(SelectorTarget, string, MobileOptions.SetTextOptions

在目标用户界面元素中键入指定的文本,标识为SelectorTarget

SetText(
	    SelectorTarget targetSelector,
	    string text,
	    MobileOptions. SetTextOptions options = null
)
SetText(
	    SelectorTarget targetSelector,
	    string text,
	    MobileOptions. SetTextOptions options = null
)

targetSelector选取器目标SelectorTarget类型的对象。可以使用FromSelector(String)方法构建。

text String :要输入到指定用户界面元素的文本,存储在字符串中。

options MobileOptions.SetTextOptions (可选):为设置文本操作指定MobileOptions.SetTextOptions 。默认值为 null。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新