UiPath Documentation
activities
latest
false
用户界面自动化活动
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

应用程序生成器类

移动自动化 API 中的“应用程序构建器类”:使用此类可构建和配置要连接的应用程序。

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

定义

命名空间: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

Initializes a new instance of the ApplicationBuilderclass.

方法

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

构建

创建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: The app location.

appPackage String (Optional): The mobile application package.

appActivity String (Optional): Add an activity instance.

返回值

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: Set a up a startup page, by passing it as a 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: The type of platform hosting the browser.

capabilities Dictionary< String, String>: Configure additional capabilities. Visit Appium capabilities to see the available capabilities.

返回值

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: The type of platform hosting the browser.

key String: The name of the capability that you want to add. Visit Appium capabilities to see the available capabilities.

value String: The value of the capability that you want to add.

返回值

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: The app location.

返回值

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: Set a startup page, by passing it as a string.

返回值

ApplicationBuilder

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

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新