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

用户界面自动化活动

上次更新日期 2026年3月24日

应用程序生成器类

使用此类来构建和配置要连接到的应用程序。

定义

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

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

语法

public class ApplicationBuilder
public class ApplicationBuilder

ApplicationBuilder类型公开以下成员。

构造函数

public ApplicationBuilder(
	string displayName
)
public ApplicationBuilder(
	string displayName
)

ApplicationBuilder :初始化ApplicationBuilder类的新实例。

方法

您可以使用这些方法来构建应用程序。

构建

创建Application对象,以供日后配置。

定义

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

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

ApplicationBuilder.Build
Build()
Build()
返回值

Application

Application 对象。

WithAndroidApp

指定您要使用的 Android 应用程序。

定义

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

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

ApplicationBuilder.WithAndroidApp(string, string, string)
WithAndroidApp(
	string appUrl,
	string appPackage = null,
	string appActivity = null
)
WithAndroidApp(
	string appUrl,
	string appPackage = null,
	string appActivity = null
)

appUrl String : 应用程序位置。

appPackage String (可选):移动应用程序包。

appActivity String (可选):添加活动实例。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

WithAndroidWeb

指定要使用的 Android 网站。

定义

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

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

ApplicationBuilder.WithAndroidWeb(string)
WithAndroidWeb(
	string startPage
)
WithAndroidWeb(
	string startPage
)

startPage String : 通过将启动页面作为string传递来设置启动页面。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

WithCapabilities

配置要使用的应用程序的功能。

定义

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

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

ApplicationBuilder.WithCapabilities(PlatformType, Dictionary<string, string>)
WithCapabilities(
	PlatformType platform,
	Dictionary<string, string> capabilities
)
WithCapabilities(
	PlatformType platform,
	Dictionary<string, string> capabilities
)

platform PlatformType :托管浏览器的平台类型。

capabilities字典< StringString > :配置其他功能。(可选):请访问Appium 功能,查看可用功能。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

WithCapability

向您要使用的应用程序添加一项功能。

定义

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

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

ApplicationBuilder.WithCapability(PlatformType, string, string)
WithCapability(
    PlatformType platform,
    string key,
    string value
)
WithCapability(
    PlatformType platform,
    string key,
    string value
)

platform PlatformType :托管浏览器的平台类型。

key String : 要添加的功能的名称。(可选):请访问Appium 功能,查看可用功能。

value String : 要添加的功能的值。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

WithIosApp

指定您要使用的 iOS 应用程序。

定义

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

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

ApplicationBuilder.WithIosApp(string)
WithIosApp(
	string appUrl
)
WithIosApp(
	string appUrl
)

appUrl String : 应用程序位置。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

WithIosWeb

指定您要使用的 iOS 网页应用程序。

定义

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

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

ApplicationBuilder.WithIosWeb(string)
WithIosWeb(
	string startPage
)
WithIosWeb(
	string startPage
)

startPage String :通过将启动页面作为string传递来设置启动页面。

返回值

ApplicationBuilder

返回更新的应用程序生成器。

  • 定义
  • 语法
  • 构造函数
  • 方法
  • 构建
  • WithAndroidApp
  • WithAndroidWeb
  • WithCapabilities
  • WithCapability
  • WithIosApp
  • WithIosWeb

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新