Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"Untitled Project" / "Untitled Build" with an empty name — even after #2495 carried the flags to
the provider (#2494). The builder now emits `appium:deviceName`, `appium:platformVersion`, and
`appium:app` and no legacy key, verified against live App Automate sessions.
- Added: `--provider-appium-version <version>` (alias `--appium-version`) pins the Appium server
BrowserStack runs for the session, as `bstack:options.appiumVersion`. Unset, BrowserStack falls
back to Appium 1.x, which predates the `mobile:` commands the interactor issues (`deepLink`,
`pressButton`, `activateApp`).
- Changed (sessions): the implicit session is now keyed by workspace **and platform**, so one checkout
can drive iOS and Android without inventing a `--session` name for every command (#2580). An
implicit session was addressed by `cwd:<workspace>:default`, one slot per checkout, and it stayed
Expand Down
10 changes: 10 additions & 0 deletions packages/command-registry/src/flag-definitions-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,16 @@ export const CONNECTION_FLAG_DEFINITIONS: readonly FlagDefinition[] = [
projectConfig: false,
recorded: false,
},
{
key: 'providerAppiumVersion',
names: ['--provider-appium-version', '--appium-version'],
type: 'string',
usageLabel: '--provider-appium-version <version>',
usageDescription:
'Hosted cloud provider Appium server version, for example 3.2.0. Without it BrowserStack falls back to its default (Appium 1.x)',
projectConfig: false,
recorded: false,
},
{
key: 'providerLanguage',
names: ['--provider-language', '--language'],
Expand Down
1 change: 1 addition & 0 deletions packages/command-registry/src/flag-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const COMMON_COMMAND_SUPPORTED_FLAG_KEYS = flagKeys(
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/client-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export type AgentDeviceRequestOverrides = Pick<
| 'providerDeviceOrientation'
| 'providerGeoLocation'
| 'providerTimezone'
| 'providerAppiumVersion'
| 'providerLanguage'
| 'providerLocale'
| 'providerNetworkProfile'
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/lease-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const LEASE_ALLOCATE_PROVIDER_FLAG_KEYS = [
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/remote-config-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export type CloudProviderProfileFields = {
providerDeviceOrientation?: ProviderDeviceOrientation;
providerGeoLocation?: string;
providerTimezone?: string;
providerAppiumVersion?: string;
providerLanguage?: string;
providerLocale?: string;
providerNetworkProfile?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DEVICE_FEATURE_FIELDS = [
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand All @@ -34,6 +35,7 @@ test('configured device features project onto BrowserStack vendor capability key
providerDeviceOrientation: 'portrait',
providerGeoLocation: 'US',
providerTimezone: 'New_York',
providerAppiumVersion: '3.2.0',
providerLanguage: 'Fr',
providerLocale: 'Fr',
providerNetworkProfile: '4g-lte-advanced-good',
Expand All @@ -46,6 +48,7 @@ test('configured device features project onto BrowserStack vendor capability key
deviceOrientation: 'portrait',
geoLocation: 'US',
timezone: 'New_York',
appiumVersion: '3.2.0',
language: 'Fr',
locale: 'Fr',
networkProfile: '4g-lte-advanced-good',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type BrowserStackDeviceFeatureFields = Pick<
| 'providerDeviceOrientation'
| 'providerGeoLocation'
| 'providerTimezone'
| 'providerAppiumVersion'
| 'providerLanguage'
| 'providerLocale'
| 'providerNetworkProfile'
Expand Down Expand Up @@ -64,6 +65,14 @@ export const BROWSERSTACK_DEVICE_FEATURE_SPECS: readonly BrowserStackDeviceFeatu
flag: '--provider-timezone',
type: 'string',
},
{
// BrowserStack defaults to Appium 1.x when unset; `mobile:` commands the interactor issues
// (deepLink, pressButton, activateApp) need a 2.x+ server.
field: 'providerAppiumVersion',
capability: 'appiumVersion',
flag: '--provider-appium-version',
type: 'string',
},
{
field: 'providerLanguage',
capability: 'language',
Expand Down
1 change: 1 addition & 0 deletions scripts/integration-progress-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ function summarizeProviderScenarioFlagExclusions() {
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand Down
1 change: 1 addition & 0 deletions src/cli-schema/command-overrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const SCHEMA_ONLY_CLI_COMMAND_SCHEMAS = {
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand Down
1 change: 1 addition & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ function buildClientConfig(ctx: CliRunContext): AgentDeviceClientConfig {
providerDeviceOrientation: currentFlags.providerDeviceOrientation,
providerGeoLocation: currentFlags.providerGeoLocation,
providerTimezone: currentFlags.providerTimezone,
providerAppiumVersion: currentFlags.providerAppiumVersion,
providerLanguage: currentFlags.providerLanguage,
providerLocale: currentFlags.providerLocale,
providerNetworkProfile: currentFlags.providerNetworkProfile,
Expand Down
2 changes: 2 additions & 0 deletions src/cli/connection/profile-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function readCloudDeviceFeatureProfileFields(
| 'providerDeviceOrientation'
| 'providerGeoLocation'
| 'providerTimezone'
| 'providerAppiumVersion'
| 'providerLanguage'
| 'providerLocale'
| 'providerNetworkProfile'
Expand All @@ -26,6 +27,7 @@ export function readCloudDeviceFeatureProfileFields(
providerDeviceOrientation: flags.providerDeviceOrientation,
providerGeoLocation: flags.providerGeoLocation,
providerTimezone: flags.providerTimezone,
providerAppiumVersion: flags.providerAppiumVersion,
providerLanguage: flags.providerLanguage,
providerLocale: flags.providerLocale,
providerNetworkProfile: flags.providerNetworkProfile,
Expand Down
3 changes: 3 additions & 0 deletions src/cli/parser/__tests__/args-parse-session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,15 @@ test('parseArgs recognizes connect device-feature flags and their short aliases'
'--network-profile',
'4g-lte-advanced-good',
'--provider-no-resign-app',
'--appium-version',
'3.2.0',
],
{ strictFlags: true },
);
assert.equal(parsed.flags.providerDeviceOrientation, 'portrait');
assert.equal(parsed.flags.providerGeoLocation, 'US');
assert.equal(parsed.flags.providerTimezone, 'New_York');
assert.equal(parsed.flags.providerAppiumVersion, '3.2.0');
assert.equal(parsed.flags.providerLanguage, 'Fr');
assert.equal(parsed.flags.providerLocale, 'Fr');
assert.equal(parsed.flags.providerNetworkProfile, '4g-lte-advanced-good');
Expand Down
1 change: 1 addition & 0 deletions src/commands/command-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function buildFlags(options: InternalRequestOptions): CommandFlags {
providerDeviceOrientation: options.providerDeviceOrientation,
providerGeoLocation: options.providerGeoLocation,
providerTimezone: options.providerTimezone,
providerAppiumVersion: options.providerAppiumVersion,
providerLanguage: options.providerLanguage,
providerLocale: options.providerLocale,
providerNetworkProfile: options.providerNetworkProfile,
Expand Down
1 change: 1 addition & 0 deletions src/daemon/handlers/session-doctor-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const REMOTE_PROVIDER_FLAG_KEYS = [
'providerDeviceOrientation',
'providerGeoLocation',
'providerTimezone',
'providerAppiumVersion',
'providerLanguage',
'providerLocale',
'providerNetworkProfile',
Expand Down
1 change: 1 addition & 0 deletions src/remote/remote-config-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const REMOTE_CONFIG_FIELD_SPECS = [
},
{ key: 'providerGeoLocation', type: 'string' },
{ key: 'providerTimezone', type: 'string' },
{ key: 'providerAppiumVersion', type: 'string' },
{ key: 'providerLanguage', type: 'string' },
{ key: 'providerLocale', type: 'string' },
{ key: 'providerNetworkProfile', type: 'string' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ test('BrowserStack facade nests device-feature capabilities inside bstack:option
providerDeviceOrientation: 'portrait',
providerGeoLocation: 'US',
providerTimezone: 'New_York',
providerAppiumVersion: '3.2.0',
providerLanguage: 'Fr',
providerLocale: 'Fr',
providerNetworkProfile: '4g-lte-advanced-good',
Expand All @@ -127,6 +128,7 @@ test('BrowserStack facade nests device-feature capabilities inside bstack:option
deviceOrientation: 'portrait',
geoLocation: 'US',
timezone: 'New_York',
appiumVersion: '3.2.0',
language: 'Fr',
locale: 'Fr',
networkProfile: '4g-lte-advanced-good',
Expand Down
2 changes: 2 additions & 0 deletions website/docs/docs/browserstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Optional device features:
--provider-device-orientation portrait # or landscape (alias --device-orientation)
--provider-geo-location US # (alias --geo-location)
--provider-timezone New_York # (alias --timezone)
--provider-appium-version 3.2.0 # (alias --appium-version)
--provider-language Fr # (alias --language)
--provider-locale Fr # (alias --locale)
--provider-network-profile 4g-lte-advanced-good # (alias --network-profile)
Expand All @@ -54,6 +55,7 @@ Optional device features:
BrowserStack receives these values in `bstack:options` when it creates the hosted session.

- The orientation applies when the session starts. An activity without a fixed orientation, such as a Chrome Custom Tab hosting OAuth, can still open in landscape. Run `agent-device orientation portrait` after launching it when needed.
- `--provider-appium-version` pins the Appium server BrowserStack runs for the session. Unset, BrowserStack falls back to its default Appium 1.x; `mobile:` commands such as `deepLink` and `pressButton` need a 2.x or newer server.
- `--provider-network-profile` and `--provider-custom-network` are mutually exclusive.
- `--provider-no-resign-app` applies to iOS only. BrowserStack re-signs uploaded iOS apps with its provisioning profile, which strips entitlements; opt out when testing entitlement-dependent features such as push notifications.

Expand Down
Loading