forked from facebookarchive/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add types for WDA caps and settings (#885)
- Loading branch information
1 parent
00513be
commit 4b3c220
Showing
5 changed files
with
61 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export { checkForDependencies, bundleWDASim } from './lib/check-dependencies'; | ||
export { NoSessionProxy } from './lib/no-session-proxy'; | ||
export { WebDriverAgent } from './lib/webdriveragent'; | ||
export { WDA_BASE_URL, WDA_RUNNER_BUNDLE_ID, PROJECT_FILE } from './lib/constants'; | ||
export { resetTestProcesses, BOOTSTRAP_PATH } from './lib/utils'; | ||
|
||
export * from './lib/types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// WebDriverAgentLib/Utilities/FBSettings.h | ||
export interface WDASettings { | ||
elementResponseAttribute?: string; | ||
shouldUseCompactResponses?: boolean; | ||
mjpegServerScreenshotQuality?: number; | ||
mjpegServerFramerate?: number; | ||
screenshotQuality?: number; | ||
elementResponseAttributes?: string; | ||
mjpegScalingFactor?: number; | ||
mjpegFixOrientation?: boolean; | ||
keyboardAutocorrection?: boolean; | ||
keyboardPrediction?: boolean; | ||
customSnapshotTimeout?: number; | ||
snapshotMaxDepth?: number; | ||
useFirstMatch?: boolean; | ||
boundElementsByIndex?: boolean; | ||
reduceMotion?: boolean; | ||
defaultActiveApplication?: string; | ||
activeAppDetectionPoint?: string; | ||
includeNonModalElements?: boolean; | ||
defaultAlertAction?: 'accept' | 'dismiss'; | ||
acceptAlertButtonSelector?: string; | ||
dismissAlertButtonSelector?: string; | ||
screenshotOrientation?: 'auto' | 'portrait' | 'portraitUpsideDown' | 'landscapeRight' | 'landscapeLeft' | ||
waitForIdleTimeout?: number; | ||
animationCoolOffTimeout?: number; | ||
} | ||
|
||
// WebDriverAgentLib/Utilities/FBCapabilities.h | ||
export interface WDACapabilities { | ||
bundleId?: string; | ||
initialUrl?: string; | ||
arguments?: string[]; | ||
environment?: Record<string, string>; | ||
eventloopIdleDelaySec?: number; | ||
shouldWaitForQuiescence?: boolean; | ||
shouldUseTestManagerForVisibilityDetection?: boolean; | ||
maxTypingFrequency?: number; | ||
shouldUseSingletonTestManager?: boolean; | ||
waitForIdleTimeout?: number; | ||
shouldUseCompactResponses?: number; | ||
elementResponseFields?: unknown; | ||
disableAutomaticScreenshots?: boolean; | ||
shouldTerminateApp?: boolean; | ||
forceAppLaunch?: boolean; | ||
useNativeCachingStrategy?: boolean; | ||
forceSimulatorSoftwareKeyboardPresence?: boolean; | ||
defaultAlertAction?: 'accept' | 'dismiss'; | ||
appLaunchStateTimeoutSec?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"checkJs": true | ||
}, | ||
"include": [ | ||
"index.js", | ||
"index.ts", | ||
"lib" | ||
] | ||
} |