Appearance
browserstack-client • Readme | API
browserstack-client / AppAutomateClient
Class: AppAutomateClient
AppAutomateClient represents a client for interacting with the BrowserStack App Automate API.
Index
getPlan — Retrieves the plan information for App Automate.
getDevices — Retrieves the list of devices available for App Automate.
getProjects — Retrieves the projects from the App Automate API.
getProject — Retrieves a project by its ID.
updateProject — Updates a project in the App Automate API.
deleteProject — Deletes a project.
getBadgeKey — Retrieves the badge key for a specific project.
getBuilds — Retrieves a list of builds from the App Automate API.
getBuild — Retrieves information about a specific build.
updateBuild — Updates a build in the App Automate API.
deleteBuild — Deletes a build with the specified ID.
uploadBuildTerminalLogs — Uploads terminal logs for a specific build.
uploadSessionTerminalLogs — Uploads terminal logs for a session.
getSession — Retrieves the session details for a given session ID.
updateSessionStatus — Updates the status of a session in the App Automate API.
deleteSession — Deletes a session in the App Automate API.
getSessionLogs — Retrieves the session logs for a specific build and session.
getSessionDeviceLogs — Retrieves the device logs for a specific session.
getSessionAppiumLogs — Retrieves the Appium logs for a specific session.
getSessionNetworkLogs — Retrieves the network logs for a specific session in a build.
getSessionAppProfilingDataV1 — Retrieves the app profiling data for a specific session in a build.
getSessionAppProfilingDataV2 — Retrieves the app profiling data for a specific session in a build.
uploadMediaFile — Uploads a media file to the App Automate API.
getMediaFiles — Retrieves the media files associated with the App Automate session.
getMediaFilesByCustomId — Retrieves media files by custom ID.
getGroupMediaFiles — Retrieves the group's media files from the App Automate API.
deleteMediaFile — Deletes a media file from the app automate custom media.
uploadAppiumApp — Uploads an Appium app to BrowserStack App Automate.
getAppiumApps — Retrieves the list of Appium apps from the App Automate API.
getAppiumAppsByCustomId — Retrieves the Appium apps by custom ID.
getAppiumGroupApps — Retrieves the list of App Automate apps for the group using the specified fetch options.
deleteAppiumApp — Deletes an Appium app.
uploadFlutterApp — Uploads a Flutter app for App Automate.
getFlutterApps — Retrieves the list of Flutter apps for Android.
getFlutterApp — Retrieves the Flutter app with the specified appId.
deleteFlutterApp — Deletes a Flutter app from the BrowserStack App Automate service.
uploadEspressoApp — Uploads an Espresso app to BrowserStack.
getEspressoApps — Retrieves the Espresso apps from the App Automate API.
getEspressoApp — Retrieves the Espresso app with the specified appId.
deleteEspressoApp — Deletes an Espresso app.
uploadXCUITestApp — Uploads an XCUITest app to BrowserStack App Automate.
getXCUITestApps — Retrieves the XCUITest apps available in the BrowserStack App Automate.
getXCUITestApp — Retrieves the XCUITest app with the specified appId.
deleteXCUITestApp — Deletes an XCUITest app.
uploadDetoxAndroidApp — Uploads a Detox Android app or app client to the App Automate service.
See
https://www.browserstack.com/app-automate/rest-api
Extends
APIClient
Constructors
new AppAutomateClient(options)
new AppAutomateClient(
options
?):AppAutomateClient
Constructs a new instance of the AppAutomateClient class.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | BrowserStackOptions | Optional configuration options for the client. |
Returns
Overrides
APIClient.constructor
Source
Methods
getPlan()
getPlan(
options
?):Promise
<Object
>
Retrieves the plan information for App Automate.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves with the plan information.
Member Type Description automate_plan
string
Description
Specifies your Automate plan name
ExampleAutomate Mobile
parallel_sessions_running
number
Description
Number of parallel sessions currently running
Example0
parallel_sessions_max_allowed
number
Description
Maximum number of parallel sessions you can run
Example0
team_parallel_sessions_max_allowed
number
Description
Maximum number of parallel sessions allowed in a team
Example250
queued_sessions
number
Description
Number of sessions currently queued
Example10
queued_sessions_max_allowed
number
Description
Maximum number of sessions that can be queued
Example240
Source
getDevices()
getDevices(
options
?):Promise
<Object
[]>
Retrieves the list of devices available for App Automate.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves with the list of devices.
Source
getProjects()
getProjects(
options
?):Promise
<Object
[]>
Retrieves the projects from the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the API request. |
Returns
Promise
<Object
[]>
A promise that resolves with the projects.
Source
getProject()
getProject(
projectId
,options
?):Promise
<Object
&Object
>
Retrieves a project by its ID.
Parameters
Parameter | Type | Description |
---|---|---|
projectId | number | The ID of the project to retrieve. |
options ? | APIFetchOptions <Object > | Additional options for the fetch request. |
Returns
Promise
<Object
& Object
>
A promise that resolves to the retrieved project.
Source
updateProject()
updateProject(
projectId
,body
,options
?):Promise
<Object
>
Updates a project in the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
projectId | number | The ID of the project to update. |
body | Object | The request body containing the updated project data. |
body.name | string | Description Name of your project Example pricing_project |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves with the updated project data.
Member Type Description id
number
Description
ID of your project
Example866256
name
string
Description
Name of your project
Examplepricing_project
user_id
number
Description
Identifier for the user
Example256454
group_id
number
Description
Identifier for your account or group
Example2
sub_group_id
number
Description
Identifier for a team in a group
Example0
created_at
string
Description
Time at which the project was created on BrowserStack servers
Example2020-03-11T10:14:36.000Z
updated_at
string
Description
Time at which the project was updated on BrowserStack servers
Example2020-09-18T09:45:57.000Z
Source
deleteProject()
deleteProject(
projectId
,options
?):Promise
<Object
>
Deletes a project.
Parameters
Parameter | Type | Description |
---|---|---|
projectId | number | The ID of the project to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the project is successfully deleted.
Member Type Description status
string
Description
Status of the operation
Exampleok
message
string
Description
Message indicating the status of the operation
ExampleProject 966019 was deleted successfully.
Source
getBadgeKey()
getBadgeKey(
projectId
,options
?):Promise
<string
>
Retrieves the badge key for a specific project.
Parameters
Parameter | Type | Description |
---|---|---|
projectId | number | The ID of the project. |
options ? | APIFetchOptions <Object > | Additional options for the fetch request. |
Returns
Promise
<string
>
A promise that resolves to the badge key.
Source
getBuilds()
getBuilds(
query
?,options
?):Promise
<Object
[]>
Retrieves a list of builds from the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
query ? | Object | Optional query parameters for filtering the builds. |
query.projectId ? | number | Description ID of your project |
query.limit ? | number | Description Specify the number of results to be displayed. The default value is 10, and the maximum value is 100 |
query.offset ? | number | Description Retrieve builds from a specific point using the offset parameter |
query.status ? | "running" | "timeout" | "failed" | "done" | Description Status of the build |
options ? | APIFetchOptions <Object > | Optional fetch options for the API request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of automation builds.
Source
getBuild()
getBuild(
buildId
,options
?):Promise
<Object
>
Retrieves information about a specific build.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build to retrieve. |
options ? | APIFetchOptions <Object > | Additional options for the fetch request. |
Returns
Promise
<Object
>
A promise that resolves to the build information, including the build details and associated sessions.
Member Type Value Description sessions
Object
&Object
&Object
[]- - name
string
- Description
Name of your build
Examplepricing_project_build
duration
number
- Description
Duration of build execution
Example10
status
"running"
|"timeout"
|"failed"
|"done"
- user_id
number
- Description
Identifier for the user
Example256454
group_id
number
- Description
Identifier for your account or group
Example2
sub_group_id
number
- Description
Identifier for a team in a group
Example0
automation_project_id
number
- Description
ID of your project
Example866256
hashed_id
string
- Description
Hashed ID of the build
Example4207442b2b0567368956dba064c22a3235a76214
build_tag
string
- Description
Tag for the build
Examplepricing_project_build
delta
boolean
- Description
Indicates whether the build is a delta build
Examplefalse
framework
string
- Description
Framework used for the build
Exampleselenium
test_data
Record
<string
,never
>- Description
Test data used for the buildcreated_at
string
- Description
Time at which the project was created on BrowserStack servers
Example2020-03-11T10:14:36.000Z
updated_at
string
- Description
Time at which the project was updated on BrowserStack servers
Example2020-09-18T09:45:57.000Z
Source
updateBuild()
updateBuild(
buildId
,body
,options
?):Promise
<Object
>
Updates a build in the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build to update. |
body | Object | The request body containing the updated build information. |
body.build_tag | string | Description The new build tag that you want to set Example registration |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A Promise that resolves to the updated build.
Member Type Description name
string
Description
Name of your build
Examplepricing_project_build
duration
number
Description
Duration of build execution
Example10
status
"running"
|"timeout"
|"failed"
|"done"
user_id
number
Description
Identifier for the user
Example256454
group_id
number
Description
Identifier for your account or group
Example2
sub_group_id
number
Description
Identifier for a team in a group
Example0
automation_project_id
number
Description
ID of your project
Example866256
hashed_id
string
Description
Hashed ID of the build
Example4207442b2b0567368956dba064c22a3235a76214
build_tag
string
Description
Tag for the build
Examplepricing_project_build
delta
boolean
Description
Indicates whether the build is a delta build
Examplefalse
framework
string
Description
Framework used for the build
Exampleselenium
test_data
Record
<string
,never
>Description
Test data used for the buildcreated_at
string
Description
Time at which the project was created on BrowserStack servers
Example2020-03-11T10:14:36.000Z
updated_at
string
Description
Time at which the project was updated on BrowserStack servers
Example2020-09-18T09:45:57.000Z
Throws
If an error occurs during the update.
Source
deleteBuild()
deleteBuild(
buildId
,options
?):Promise
<Object
>
Deletes a build with the specified ID.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build to delete. |
options ? | APIFetchOptions <Object > | Additional options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the build is successfully deleted.
Member Type Description status
string
Description
Status of deletion
Exampleok
message
string
Description
Message indicating the deletion of the build
ExampleBuild a4fb480a55efd6b3c558afb1ee051a7c337b8ef0 was deleted successfully.
Source
uploadBuildTerminalLogs()
uploadBuildTerminalLogs(
buildId
,data
,options
?):Promise
<Object
>
Uploads terminal logs for a specific build.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
data | Object & Object | The request body containing the logs file and its filename. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the request.
Member Type Description message
string
Description
Message indicating upload result.
ExampleFile has been uploaded successfully!
Source
uploadSessionTerminalLogs()
uploadSessionTerminalLogs(
sessionId
,data
,options
?):Promise
<Object
>
Uploads terminal logs for a session.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | string | The ID of the session. |
data | Object & Object | The request body containing the logs file and filename. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the request.
Member Type Description message
string
Description
Message indicating upload result.
ExampleFile has been uploaded successfully!
Source
getSession()
getSession(
sessionId
,options
?):Promise
<Object
&Object
&Object
&Object
>
Retrieves the session details for a given session ID.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | string | The ID of the session to retrieve. |
options ? | APIFetchOptions <Object > | Additional options for the fetch request. |
Returns
Promise
<Object
& Object
& Object
& Object
>
A promise that resolves to the automation session data.
Source
updateSessionStatus()
updateSessionStatus(
sessionId
,body
,options
?):Promise
<Object
&Object
&Object
&Object
>
Updates the status of a session in the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | string | The ID of the session to update. |
body | Object | The request body containing the updated session status. |
body.status | "failed" | "passed" | Description Status of the session Example passed @enum {string} |
body.reason ? | string | Description Reason for marking the session as failed Example Test failed because of assertion error |
options ? | APIFetchOptions <Object > | Additional options for the API request. |
Returns
Promise
<Object
& Object
& Object
& Object
>
A Promise that resolves to the updated automation session.
Source
deleteSession()
deleteSession(
sessionId
,options
?):Promise
<Object
>
Deletes a session in the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
sessionId | string | The ID of the session to delete. |
options ? | APIFetchOptions <Object > | Additional options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the session is successfully deleted.
Member Type Description status
string
Description
Status of deletion
Exampleok
message
string
Description
Message indicating the deletion of the session
ExampleSession 4207442b2b0567368956dba064c22a3235a76214 was deleted successfully.
Source
getSessionLogs()
getSessionLogs(
buildId
,sessionId
,options
?):Promise
<string
>
Retrieves the session logs for a specific build and session.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<string
>
A Promise that resolves to the session logs.
Source
getSessionDeviceLogs()
getSessionDeviceLogs(
buildId
,sessionId
,options
?):Promise
<string
>
Retrieves the device logs for a specific session.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<string
>
A Promise that resolves with the device logs.
Source
getSessionAppiumLogs()
getSessionAppiumLogs(
buildId
,sessionId
,options
?):Promise
<string
>
Retrieves the Appium logs for a specific session.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<string
>
A Promise that resolves to the Appium logs.
Source
getSessionNetworkLogs()
getSessionNetworkLogs(
buildId
,sessionId
,options
?):Promise
<Record
<string
,never
>>
Retrieves the network logs for a specific session in a build.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the network logs request. |
Returns
Promise
<Record
<string
, never
>>
A Promise that resolves to the network logs response.
Source
getSessionAppProfilingDataV1()
getSessionAppProfilingDataV1(
buildId
,sessionId
,options
?):Promise
<Object
[]>
Retrieves the app profiling data for a specific session in a build.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to the app profiling data.
Source
getSessionAppProfilingDataV2()
getSessionAppProfilingDataV2(
buildId
,sessionId
,options
?):Promise
<Object
>
Retrieves the app profiling data for a specific session in a build.
Parameters
Parameter | Type | Description |
---|---|---|
buildId | string | The ID of the build. |
sessionId | string | The ID of the session. |
options ? | APIFetchOptions <Object > | Additional options for the API request. |
Returns
Promise
<Object
>
A promise that resolves with the app profiling data.
Member Type metadata
Object
data
Object
data.units
Object
Source
uploadMediaFile()
uploadMediaFile(
data
,options
?):Promise
<Object
>
Uploads a media file to the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
data | Object & Object | The request body containing the media file to upload. |
options ? | APIFetchOptions <Object > | Optional fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the API request.
Member Type Description media_id
string
Description
Unique ID returned on successful upload of your media file on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
media_url
string
Description
Unique identifier returned upon successful upload of your media file on BrowserStack. This value is used to specify the media files to be used in your tests.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
media_name
string
Description
Name of the media file uploaded.
Examplemedia.jpg
uploaded_at
string
Description
Timestamp of the media file upload.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID of the media file uploaded. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows members of other teams to use the media files in their tests.
Examplesteve/SampleMedia
Source
getMediaFiles()
getMediaFiles(
options
?):Promise
<Object
[]>
Retrieves the media files associated with the App Automate session.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | Optional fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of media files, or an empty array if no media files are found.
Source
getMediaFilesByCustomId()
getMediaFilesByCustomId(
customId
,options
?):Promise
<Object
[]>
Retrieves media files by custom ID.
Parameters
Parameter | Type | Description |
---|---|---|
customId | string | The custom ID to filter media files. |
options ? | APIFetchOptions <Object > | Optional fetch options. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of media files or an empty array if no media files are found.
Source
getGroupMediaFiles()
getGroupMediaFiles(
options
?):Promise
<Object
[]>
Retrieves the group's media files from the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | Optional fetch options for the API request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of group media files, or an empty array if the response contains a "message" property.
Source
deleteMediaFile()
deleteMediaFile(
mediaId
,options
?):Promise
<Object
>
Deletes a media file from the app automate custom media.
Parameters
Parameter | Type | Description |
---|---|---|
mediaId | string | The ID of the media file to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the media file is successfully deleted.
Member Type Description success
boolean
Description
Indicates whether deletion was success or a failure.
Source
uploadAppiumApp()
uploadAppiumApp(
data
,options
?):Promise
<Object
>
Uploads an Appium app to BrowserStack App Automate.
Parameters
Parameter | Type | Description |
---|---|---|
data | { custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object | The request body containing the app file or URL to be uploaded. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A Promise that resolves to the response of the upload request.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
getAppiumApps()
getAppiumApps(
options
?):Promise
<Object
[]>
Retrieves the list of Appium apps from the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | Optional fetch options for customizing the request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of Appium apps, or an empty array if no apps are found.
Source
getAppiumAppsByCustomId()
getAppiumAppsByCustomId(
customId
,options
?):Promise
<Object
[]>
Retrieves the Appium apps by custom ID.
Parameters
Parameter | Type | Description |
---|---|---|
customId | string | The custom ID of the app. |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to the retrieved Appium apps.
Source
getAppiumGroupApps()
getAppiumGroupApps(
options
?):Promise
<Object
[]>
Retrieves the list of App Automate apps for the group using the specified fetch options.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to the list of group apps, or an empty array if there is a "message" property in the response data.
Source
deleteAppiumApp()
deleteAppiumApp(
appId
,options
?):Promise
<Object
>
Deletes an Appium app.
Parameters
Parameter | Type | Description |
---|---|---|
appId | string | The ID of the app to delete. |
options ? | APIFetchOptions <Object > | Optional fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the app is successfully deleted.
Member Type Description success
boolean
Description
Indicates whether deletion was success or a failure.
Source
uploadFlutterApp()
uploadFlutterApp(platform, body, options)
uploadFlutterApp<
P
>(platform
,body
,options
?):Promise
<Object
>
Uploads a Flutter app for App Automate.
Type parameters
Type parameter |
---|
P extends ios |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
body | { custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object | - |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the request.
Member Type Description test_package_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_name
string
Description
Name of the media file uploaded.
Examplemedia.zip
uploaded_at
string
Description
Timestamp of the media file upload.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
uploadFlutterApp(platform, body, options)
uploadFlutterApp<
P
>(platform
,body
,options
?):Promise
<Object
>
Uploads a Flutter app for App Automate.
Type parameters
Type parameter |
---|
P extends android |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
body | { custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object | - |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the request.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
getFlutterApps()
getFlutterApps(platform, options)
getFlutterApps<
P
>(platform
,options
?):Promise
<Object
[]>
Retrieves the list of Flutter apps for Android.
Type parameters
Type parameter |
---|
P extends android |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of Flutter apps, or an empty array if no apps are found.
Source
getFlutterApps(platform, options)
getFlutterApps<
P
>(platform
,options
?):Promise
<Object
[]>
Retrieves the list of Flutter apps for Android.
Type parameters
Type parameter |
---|
P extends ios |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of Flutter apps, or an empty array if no apps are found.
Source
getFlutterApp()
getFlutterApp(platform, appId, options)
getFlutterApp<
P
>(platform
,appId
,options
?):Promise
<Object
>
Retrieves the Flutter app with the specified appId.
Type parameters
Type parameter |
---|
P extends android |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
appId | string | The ID of the Flutter app to retrieve. |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the retrieved Flutter app.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
getFlutterApp(platform, appId, options)
getFlutterApp<
P
>(platform
,appId
,options
?):Promise
<Object
>
Retrieves the Flutter app with the specified appId.
Type parameters
Type parameter |
---|
P extends ios |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
appId | string | The ID of the Flutter app to retrieve. |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the retrieved Flutter app.
Member Type Description test_package_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
test_package_name
string
Description
Name of the media file uploaded.
Examplemedia.zip
uploaded_at
string
Description
Timestamp of the media file upload.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
deleteFlutterApp()
deleteFlutterApp(platform, appId, options)
deleteFlutterApp<
P
>(platform
,appId
,options
?):Promise
<Object
>
Deletes a Flutter app from the BrowserStack App Automate service.
Type parameters
Type parameter |
---|
P extends android |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
appId | string | The ID of the app to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the app is successfully deleted.
Member Type success
Object
success.message
string
Source
deleteFlutterApp(platform, appId, options)
deleteFlutterApp<
P
>(platform
,appId
,options
?):Promise
<Object
>
Deletes a Flutter app from the BrowserStack App Automate service.
Type parameters
Type parameter |
---|
P extends ios |
Parameters
Parameter | Type | Description |
---|---|---|
platform | P | - |
appId | string | The ID of the app to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the app is successfully deleted.
Member Type success
Object
success.message
string
Source
uploadEspressoApp()
uploadEspressoApp(
data
,options
?):Promise
<Object
>
Uploads an Espresso app to BrowserStack.
Parameters
Parameter | Type | Description |
---|---|---|
data | { custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object | The request body containing the app file or URL. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response from the server.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
getEspressoApps()
getEspressoApps(
options
?):Promise
<Object
[]>
Retrieves the Espresso apps from the App Automate API.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the API request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of Espresso apps.
Source
getEspressoApp()
getEspressoApp(
appId
,options
?):Promise
<Object
>
Retrieves the Espresso app with the specified appId.
Parameters
Parameter | Type | Description |
---|---|---|
appId | string | The ID of the Espresso app to retrieve. |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the retrieved Espresso app.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
deleteEspressoApp()
deleteEspressoApp(
appId
,options
?):Promise
<Object
>
Deletes an Espresso app.
Parameters
Parameter | Type | Description |
---|---|---|
appId | string | The ID of the app to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the app is deleted.
Member Type Description success
Object
- success.message
string
Description
Indicates whether deletion was success or a failure.
ExampleApp with url bs://231e820c35ee15b8438ec31df1fb689c03abd8e5 was deleted.
Source
uploadXCUITestApp()
uploadXCUITestApp(
data
,options
?):Promise
<Object
>
Uploads an XCUITest app to BrowserStack App Automate.
Parameters
Parameter | Type | Description |
---|---|---|
data | { custom_id?: string | undefined; } & ({ file: Blob; } | { url: string; }) & Object | The request body containing the XCUITest app file or URL. |
options ? | APIFetchOptions <Object > | Additional options for the request. |
Returns
Promise
<Object
>
A Promise that resolves to the response of the request.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
getXCUITestApps()
getXCUITestApps(
options
?):Promise
<Object
[]>
Retrieves the XCUITest apps available in the BrowserStack App Automate.
Parameters
Parameter | Type | Description |
---|---|---|
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
[]>
A promise that resolves to an array of XCUITest apps.
Source
getXCUITestApp()
getXCUITestApp(
appId
,options
?):Promise
<Object
>
Retrieves the XCUITest app with the specified appId.
Parameters
Parameter | Type | Description |
---|---|---|
appId | string | The ID of the XCUITest app to retrieve. |
options ? | APIFetchOptions <Object > | The fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the XCUITest app.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp
Source
deleteXCUITestApp()
deleteXCUITestApp(
appId
,options
?):Promise
<Object
>
Deletes an XCUITest app.
Parameters
Parameter | Type | Description |
---|---|---|
appId | string | The ID of the app to delete. |
options ? | APIFetchOptions <Object > | The fetch options for the delete request. |
Returns
Promise
<Object
>
A promise that resolves when the app is successfully deleted.
Member Type Description success
Object
- success.message
string
Description
Indicates whether deletion was success or a failure.
ExampleApp with url bs://231e820c35ee15b8438ec31df1fb689c03abd8e5 was deleted.
Source
uploadDetoxAndroidApp()
uploadDetoxAndroidApp<
T
>(type
,data
,options
?):Promise
<Object
>
Uploads a Detox Android app or app client to the App Automate service.
Type parameters
Type parameter |
---|
T extends "app" | "app-client" |
Parameters
Parameter | Type | Description |
---|---|---|
type | T | The type of the upload, either "app" or "app-client". |
data | operations [T extends "app" ? "uploadAppAutomateDetoxAndroidApp" : "uploadAppAutomateDetoxAndroidAppClient" ]["requestBody" ]["content" ]["multipart/form-data" ] & Object | The data of the upload, including the app file and filename. |
options ? | APIFetchOptions <operations [T extends "app" ? "uploadAppAutomateDetoxAndroidApp" : "uploadAppAutomateDetoxAndroidAppClient" ]> | Optional API fetch options for the request. |
Returns
Promise
<Object
>
A promise that resolves to the response of the request.
Member Type Description app_id
string
Description
Unique ID returned on successful upload of your app on BrowserStack.
Example90c7a8h8dc82308108734e9a46c24d8f01de12881
app_url
string
Description
Unique identifier returned upon successful upload of your app on BrowserStack. This value can be used later to specify the application under test in your Appium test scripts.
Examplemedia://90c7a8h8dc82308108734e9a46c24d8f01de12881
app_name
string
Description
Name of the app file uploaded.
Exampleapp-release.apk
app_version
string
Description
Version of the app.
Example1.0.0
uploaded_at
string
Description
Timestamp of the app file upload.
Example2021-09-30T10:00:00.000Z
expiry
string
Description
Timestamp of the app file expiry.
Example2021-09-30T10:00:00.000Z
custom_id
string
Description
Custom ID defined for the uploaded app. Accepted characters are A-Z, a-z, 0-9, ., -, _. All other characters are ignored. Character limit is 100.
Examplemedia_1
shareable_id
string
Description
Shareable ID allows other users in your organization to test an app you uploaded.
Examplesteve/SampleApp