@taqwright/taqwright 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +108 -0
- package/dist/auto-appium.d.ts +12 -0
- package/dist/auto-appium.js +77 -0
- package/dist/bin/branding.d.ts +6 -0
- package/dist/bin/branding.js +22 -0
- package/dist/bin/index.d.ts +2 -0
- package/dist/bin/index.js +321 -0
- package/dist/bin/init.d.ts +26 -0
- package/dist/bin/init.js +902 -0
- package/dist/bin/inspect.d.ts +9 -0
- package/dist/bin/inspect.js +91 -0
- package/dist/bin/report-branding.d.ts +2 -0
- package/dist/bin/report-branding.js +42 -0
- package/dist/branding-assets.d.ts +1 -0
- package/dist/branding-assets.js +1 -0
- package/dist/capabilities-helpers.d.ts +7 -0
- package/dist/capabilities-helpers.js +14 -0
- package/dist/capabilities.d.ts +6 -0
- package/dist/capabilities.js +86 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +235 -0
- package/dist/discovery-setup.d.ts +1 -0
- package/dist/discovery-setup.js +61 -0
- package/dist/discovery.d.ts +17 -0
- package/dist/discovery.js +55 -0
- package/dist/docs/configuration.html +376 -0
- package/dist/docs/custom-reporters.html +265 -0
- package/dist/docs/docker.html +339 -0
- package/dist/docs/docs.js +173 -0
- package/dist/docs/generating-tests.html +161 -0
- package/dist/docs/images/taqwright-html-report.png +0 -0
- package/dist/docs/index.html +13 -0
- package/dist/docs/installation.html +686 -0
- package/dist/docs/parallel.html +271 -0
- package/dist/docs/running-tests.html +385 -0
- package/dist/docs/styles.css +460 -0
- package/dist/docs/writing-tests.html +565 -0
- package/dist/doctor.d.ts +33 -0
- package/dist/doctor.js +508 -0
- package/dist/expect.d.ts +38 -0
- package/dist/expect.js +96 -0
- package/dist/fixture/artifact-mode.d.ts +2 -0
- package/dist/fixture/artifact-mode.js +7 -0
- package/dist/fixture/index.d.ts +15 -0
- package/dist/fixture/index.js +324 -0
- package/dist/images/taqwright-html-report.png +0 -0
- package/dist/images/taqwright_favicon.png +0 -0
- package/dist/images/taqwright_logo.png +0 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +7 -0
- package/dist/inspector/codegen-appium.d.ts +3 -0
- package/dist/inspector/codegen-appium.js +228 -0
- package/dist/inspector/devices.d.ts +41 -0
- package/dist/inspector/devices.js +422 -0
- package/dist/inspector/locator-suggester.d.ts +23 -0
- package/dist/inspector/locator-suggester.js +539 -0
- package/dist/inspector/recorder.d.ts +128 -0
- package/dist/inspector/recorder.js +162 -0
- package/dist/inspector/server.d.ts +39 -0
- package/dist/inspector/server.js +1210 -0
- package/dist/inspector/session.d.ts +84 -0
- package/dist/inspector/session.js +262 -0
- package/dist/inspector/ui.d.ts +1 -0
- package/dist/inspector/ui.js +5508 -0
- package/dist/keys.d.ts +3 -0
- package/dist/keys.js +28 -0
- package/dist/locator/index.d.ts +206 -0
- package/dist/locator/index.js +1506 -0
- package/dist/logger.d.ts +5 -0
- package/dist/logger.js +5 -0
- package/dist/mobile/index.d.ts +130 -0
- package/dist/mobile/index.js +762 -0
- package/dist/network/android.d.ts +5 -0
- package/dist/network/android.js +87 -0
- package/dist/network/ca.d.ts +10 -0
- package/dist/network/ca.js +136 -0
- package/dist/network/har.d.ts +90 -0
- package/dist/network/har.js +101 -0
- package/dist/network/host-proxy.d.ts +16 -0
- package/dist/network/host-proxy.js +134 -0
- package/dist/network/index.d.ts +26 -0
- package/dist/network/index.js +105 -0
- package/dist/network/ios-sim.d.ts +3 -0
- package/dist/network/ios-sim.js +29 -0
- package/dist/network/proxy.d.ts +13 -0
- package/dist/network/proxy.js +310 -0
- package/dist/providers/appium.d.ts +23 -0
- package/dist/providers/appium.js +288 -0
- package/dist/providers/browserstack/index.d.ts +5 -0
- package/dist/providers/browserstack/index.js +77 -0
- package/dist/providers/browserstack/utils.d.ts +1 -0
- package/dist/providers/browserstack/utils.js +6 -0
- package/dist/providers/cloud.d.ts +53 -0
- package/dist/providers/cloud.js +117 -0
- package/dist/providers/emulator/index.d.ts +8 -0
- package/dist/providers/emulator/index.js +47 -0
- package/dist/providers/index.d.ts +10 -0
- package/dist/providers/index.js +33 -0
- package/dist/providers/lambdatest/index.d.ts +28 -0
- package/dist/providers/lambdatest/index.js +99 -0
- package/dist/providers/lambdatest/utils.d.ts +1 -0
- package/dist/providers/lambdatest/utils.js +6 -0
- package/dist/providers/local/index.d.ts +9 -0
- package/dist/providers/local/index.js +53 -0
- package/dist/providers/local-session.d.ts +16 -0
- package/dist/providers/local-session.js +55 -0
- package/dist/setup/archive.d.ts +2 -0
- package/dist/setup/archive.js +43 -0
- package/dist/setup/avd.d.ts +12 -0
- package/dist/setup/avd.js +103 -0
- package/dist/setup/index.d.ts +6 -0
- package/dist/setup/index.js +55 -0
- package/dist/setup/install-android.d.ts +2 -0
- package/dist/setup/install-android.js +70 -0
- package/dist/setup/install-appium.d.ts +1 -0
- package/dist/setup/install-appium.js +64 -0
- package/dist/setup/install-jdk.d.ts +1 -0
- package/dist/setup/install-jdk.js +58 -0
- package/dist/setup/paths.d.ts +16 -0
- package/dist/setup/paths.js +88 -0
- package/dist/setup/spawn-tool.d.ts +3 -0
- package/dist/setup/spawn-tool.js +11 -0
- package/dist/tracer/index.d.ts +34 -0
- package/dist/tracer/index.js +687 -0
- package/dist/tracer/proxy.d.ts +3 -0
- package/dist/tracer/proxy.js +60 -0
- package/dist/types/index.d.ts +189 -0
- package/dist/types/index.js +6 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +37 -0
- package/package.json +79 -0
package/dist/logger.d.ts
ADDED
package/dist/logger.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { Client as WebDriverClient } from 'webdriver';
|
|
2
|
+
import { Locator, type ScrollIntoViewOptions, type DragOptions } from '../locator/index.js';
|
|
3
|
+
import { type BoundingBox, type GestureOptions, type HardwareButton, Platform, type ScreenSize, type SwipeDirection } from '../types/index.js';
|
|
4
|
+
export interface ClickPoint {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface SwipeOptions {
|
|
9
|
+
duration?: number;
|
|
10
|
+
distance?: number;
|
|
11
|
+
from?: {
|
|
12
|
+
x?: number;
|
|
13
|
+
y?: number;
|
|
14
|
+
};
|
|
15
|
+
to?: {
|
|
16
|
+
x?: number;
|
|
17
|
+
y?: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface GetByOptions {
|
|
21
|
+
exact?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface LaunchAppOptions {
|
|
24
|
+
noWaitAfter?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface GeoLocation {
|
|
27
|
+
latitude: number;
|
|
28
|
+
longitude: number;
|
|
29
|
+
altitude?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface NetworkConnection {
|
|
32
|
+
wifi: boolean;
|
|
33
|
+
data: boolean;
|
|
34
|
+
airplane: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface DeviceLogEntry {
|
|
37
|
+
timestamp: number;
|
|
38
|
+
level: string;
|
|
39
|
+
message: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ScreenRecordingOptions {
|
|
42
|
+
videoType?: string;
|
|
43
|
+
timeLimit?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface PauseOptions {
|
|
46
|
+
openBrowser?: boolean;
|
|
47
|
+
port?: number;
|
|
48
|
+
}
|
|
49
|
+
export declare class Mobile {
|
|
50
|
+
private readonly driver;
|
|
51
|
+
private readonly platform;
|
|
52
|
+
private readonly defaultBundleId;
|
|
53
|
+
private readonly ctx;
|
|
54
|
+
constructor(driver: WebDriverClient, platform: Platform, defaultBundleId: string | undefined, defaultTimeout: number);
|
|
55
|
+
static wrap(driver: WebDriverClient, platform: Platform, bundleId: string | undefined, timeout: number): Mobile;
|
|
56
|
+
get raw(): WebDriverClient;
|
|
57
|
+
getPlatform(): Platform;
|
|
58
|
+
getByText(text: string | RegExp, opts?: GetByOptions): Locator;
|
|
59
|
+
getByLabel(label: string, _opts?: GetByOptions): Locator;
|
|
60
|
+
getById(id: string): Locator;
|
|
61
|
+
getByTestId(id: string): Locator;
|
|
62
|
+
getByPlaceholder(text: string, opts?: GetByOptions): Locator;
|
|
63
|
+
getByRole(role: string, opts?: {
|
|
64
|
+
name?: string | RegExp;
|
|
65
|
+
}): Locator;
|
|
66
|
+
getByType(type: string): Locator;
|
|
67
|
+
getByXpath(xpath: string): Locator;
|
|
68
|
+
getByCss(selector: string): Locator;
|
|
69
|
+
getByUiSelector(selector: string): Locator;
|
|
70
|
+
getByPredicate(predicate: string): Locator;
|
|
71
|
+
getByClassChain(chain: string): Locator;
|
|
72
|
+
installApp(path: string): Promise<void>;
|
|
73
|
+
uninstallApp(bundleId?: string): Promise<void>;
|
|
74
|
+
launchApp(bundleId?: string, opts?: LaunchAppOptions): Promise<void>;
|
|
75
|
+
private waitForAppForeground;
|
|
76
|
+
terminateApp(bundleId?: string): Promise<void>;
|
|
77
|
+
activateApp(bundleId?: string): Promise<void>;
|
|
78
|
+
close(): Promise<void>;
|
|
79
|
+
click(point: ClickPoint): Promise<void>;
|
|
80
|
+
tap(point: ClickPoint): Promise<void>;
|
|
81
|
+
swipe(direction: SwipeDirection, opts?: SwipeOptions): Promise<void>;
|
|
82
|
+
scroll(direction?: SwipeDirection, opts?: SwipeOptions): Promise<void>;
|
|
83
|
+
scrollIntoView(locator: Locator, opts?: ScrollIntoViewOptions): Promise<void>;
|
|
84
|
+
dragAndDrop(from: ClickPoint, to: ClickPoint, opts?: DragOptions): Promise<void>;
|
|
85
|
+
press(key: string): Promise<void>;
|
|
86
|
+
pressButton(button: HardwareButton): Promise<void>;
|
|
87
|
+
goBack(): Promise<void>;
|
|
88
|
+
screenshot(): Promise<Buffer>;
|
|
89
|
+
getScreenSize(): Promise<ScreenSize>;
|
|
90
|
+
gesture(opts: GestureOptions): Promise<void>;
|
|
91
|
+
viewTree(): Promise<string>;
|
|
92
|
+
getContexts(): Promise<string[]>;
|
|
93
|
+
getContext(): Promise<string>;
|
|
94
|
+
switchContext(name: string): Promise<void>;
|
|
95
|
+
switchToWebView(name?: string): Promise<string>;
|
|
96
|
+
switchToNative(): Promise<void>;
|
|
97
|
+
waitForTimeout(ms: number): Promise<void>;
|
|
98
|
+
pause(opts?: PauseOptions): Promise<void>;
|
|
99
|
+
clickByPercent(box: BoundingBox, relX?: number, relY?: number): Promise<void>;
|
|
100
|
+
setOrientation(orientation: 'portrait' | 'landscape'): Promise<void>;
|
|
101
|
+
getOrientation(): Promise<'portrait' | 'landscape'>;
|
|
102
|
+
hideKeyboard(): Promise<void>;
|
|
103
|
+
isKeyboardShown(): Promise<boolean>;
|
|
104
|
+
acceptAlert(): Promise<void>;
|
|
105
|
+
dismissAlert(): Promise<void>;
|
|
106
|
+
getAlertText(): Promise<string>;
|
|
107
|
+
backgroundApp(seconds?: number): Promise<void>;
|
|
108
|
+
getCurrentApp(): Promise<{
|
|
109
|
+
bundleId: string;
|
|
110
|
+
}>;
|
|
111
|
+
isAppInstalled(bundleId?: string): Promise<boolean>;
|
|
112
|
+
queryAppState(bundleId?: string): Promise<'not_installed' | 'not_running' | 'background' | 'foreground'>;
|
|
113
|
+
openDeepLink(url: string, bundleId?: string): Promise<void>;
|
|
114
|
+
getClipboard(): Promise<string>;
|
|
115
|
+
setClipboard(text: string): Promise<void>;
|
|
116
|
+
setLocation(loc: GeoLocation): Promise<void>;
|
|
117
|
+
getLocation(): Promise<Required<GeoLocation>>;
|
|
118
|
+
setPermission(permission: string, state: 'grant' | 'revoke'): Promise<void>;
|
|
119
|
+
setNetworkConnection(opts: Partial<NetworkConnection>): Promise<void>;
|
|
120
|
+
getNetworkConnection(): Promise<NetworkConnection>;
|
|
121
|
+
pushFile(remotePath: string, content: Buffer | string): Promise<void>;
|
|
122
|
+
pullFile(remotePath: string): Promise<Buffer>;
|
|
123
|
+
getDeviceLogs(type?: 'logcat' | 'syslog' | 'crashlog'): Promise<DeviceLogEntry[]>;
|
|
124
|
+
getLogTypes(): Promise<string[]>;
|
|
125
|
+
getDeviceTime(format?: string): Promise<string>;
|
|
126
|
+
setLocale(locale: string): Promise<void>;
|
|
127
|
+
startScreenRecording(opts?: ScreenRecordingOptions): Promise<void>;
|
|
128
|
+
stopScreenRecording(): Promise<Buffer>;
|
|
129
|
+
private appArg;
|
|
130
|
+
}
|