AI_UIAutomation/locators/camera-locators.ts

269 lines
8.0 KiB
TypeScript

import { ElementLocator } from '../drivers/types';
export const CAMERA_LOCATORS: Record<string, ElementLocator> = {
cameraCard: {
name: 'Camera Card',
ios: { using: 'predicate string', value: 'type == "XCUIElementTypeCell" AND name CONTAINS "Camera"' },
android: { using: '-android uiautomator', value: 'new UiSelector().textContains("Camera")' },
},
settingsButton: {
name: 'Settings button',
ios: { using: 'name', value: 'Settings' },
android: { using: 'text', value: 'Settings' },
},
backButton: {
name: 'Back button',
ios: { using: 'predicate string', value: 'type == "XCUIElementTypeButton" AND name CONTAINS "Back"' },
android: { using: 'content-desc', value: 'Navigate up' },
},
// Control page buttons
showBtn: {
name: 'Show controls button',
ios: { using: 'predicate string', value: 'name CONTAINS "show" OR name CONTAINS "Show"' },
android: { using: 'content-desc', value: 'Show' },
},
qualitySwitch: {
name: 'Quality switch',
ios: { using: 'name', value: 'Quality' },
android: { using: 'text', value: 'Quality' },
},
audioButton: {
name: 'Audio button',
ios: { using: 'name', value: 'Audio' },
android: { using: 'text', value: 'Audio' },
},
photoButton: {
name: 'Photo/Screenshot button',
ios: { using: 'name', value: 'Photo' },
android: { using: 'text', value: 'Photo' },
},
videoButton: {
name: 'Record video button',
ios: { using: 'name', value: 'Video' },
android: { using: 'text', value: 'Video' },
},
pauseButton: {
name: 'Pause button',
ios: { using: 'name', value: 'Pause' },
android: { using: 'text', value: 'Pause' },
},
callButton: {
name: 'Call/Talk button',
ios: { using: 'name', value: 'Call' },
android: { using: 'text', value: 'Call' },
},
featuresButton: {
name: 'Features menu',
ios: { using: 'name', value: 'Features' },
android: { using: 'text', value: 'Features' },
},
nightVisionButton: {
name: 'Night Vision',
ios: { using: 'name', value: 'Night Vision' },
android: { using: 'text', value: 'Night Vision' },
},
motionButton: {
name: 'Motion Detection toggle',
ios: { using: 'name', value: 'Motion' },
android: { using: 'text', value: 'Motion' },
},
motionTrackButton: {
name: 'Motion Tracking toggle',
ios: { using: 'name', value: 'Motion Tracking' },
android: { using: 'text', value: 'Motion Tracking' },
},
soundAlarmButton: {
name: 'Sound Alarm toggle',
ios: { using: 'name', value: 'Sound Alarm' },
android: { using: 'text', value: 'Sound Alarm' },
},
privacyButton: {
name: 'Privacy Mode',
ios: { using: 'name', value: 'Privacy Mode' },
android: { using: 'text', value: 'Privacy Mode' },
},
directionButton: {
name: 'Direction/PTZ control',
ios: { using: 'name', value: 'Direction' },
android: { using: 'text', value: 'Direction' },
},
presetButton: {
name: 'Preset positions',
ios: { using: 'name', value: 'Preset' },
android: { using: 'text', value: 'Preset' },
},
fullscreenButton: {
name: 'Fullscreen button',
ios: { using: 'name', value: 'Fullscreen' },
android: { using: 'content-desc', value: 'Fullscreen' },
},
// Events page
eventsTab: {
name: 'Events tab',
ios: { using: 'name', value: 'Events' },
android: { using: 'text', value: 'Events' },
},
eventsEdit: {
name: 'Events edit button',
ios: { using: 'name', value: 'Edit' },
android: { using: 'text', value: 'Edit' },
},
eventsSelectAll: {
name: 'Select All',
ios: { using: 'name', value: 'Select All' },
android: { using: 'text', value: 'Select All' },
},
deleteButton: {
name: 'Delete button',
ios: { using: 'name', value: 'Delete' },
android: { using: 'text', value: 'Delete' },
},
confirmButton: {
name: 'Confirm button',
ios: { using: 'name', value: 'Confirm' },
android: { using: 'text', value: 'Confirm' },
},
// Playback / Recording
playbackTab: {
name: 'Playback tab',
ios: { using: 'name', value: 'Playback' },
android: { using: 'text', value: 'Playback' },
},
sdCardTab: {
name: 'SD Card tab',
ios: { using: 'name', value: 'SD Card' },
android: { using: 'text', value: 'SD Card' },
},
recordingTab: {
name: 'Recording tab',
ios: { using: 'name', value: 'Recording' },
android: { using: 'text', value: 'Recording' },
},
finishButton: {
name: 'Finish/Done button',
ios: { using: 'name', value: 'Done' },
android: { using: 'text', value: 'Done' },
},
// Settings page items
deviceInfo: {
name: 'Device Info',
ios: { using: 'name', value: 'Device Info' },
android: { using: 'text', value: 'Device Info' },
},
firmware: {
name: 'Firmware',
ios: { using: 'name', value: 'Firmware' },
android: { using: 'text', value: 'Firmware' },
},
motionDetection: {
name: 'Motion Detection setting',
ios: { using: 'name', value: 'Motion Detection' },
android: { using: 'text', value: 'Motion Detection' },
},
basicSettings: {
name: 'Basic Settings',
ios: { using: 'name', value: 'Basic Settings' },
android: { using: 'text', value: 'Basic Settings' },
},
nightVisionSetting: {
name: 'Night Vision setting',
ios: { using: 'name', value: 'Night Vision' },
android: { using: 'text', value: 'Night Vision' },
},
talkMode: {
name: 'Talk Mode',
ios: { using: 'name', value: 'Talk Mode' },
android: { using: 'text', value: 'Talk Mode' },
},
localStorage: {
name: 'Local Storage',
ios: { using: 'name', value: 'Local Storage' },
android: { using: 'text', value: 'Local Storage' },
},
storageMode: {
name: 'Storage Mode',
ios: { using: 'name', value: 'Storage Mode' },
android: { using: 'text', value: 'Storage Mode' },
},
indicatorLight: {
name: 'Indicator Light',
ios: { using: 'name', value: 'Indicator Light' },
android: { using: 'text', value: 'Indicator Light' },
},
videoDisplay: {
name: 'Video Display',
ios: { using: 'name', value: 'Video Display' },
android: { using: 'text', value: 'Video Display' },
},
watermark: {
name: 'Watermark',
ios: { using: 'name', value: 'Watermark' },
android: { using: 'text', value: 'Watermark' },
},
flipSwitch: {
name: 'Flip',
ios: { using: 'name', value: 'Flip' },
android: { using: 'text', value: 'Flip' },
},
antiFlicker: {
name: 'Anti-Flicker',
ios: { using: 'name', value: 'Anti-Flicker' },
android: { using: 'text', value: 'Anti-Flicker' },
},
calibrate: {
name: 'Calibrate',
ios: { using: 'name', value: 'Calibrate' },
android: { using: 'text', value: 'Calibrate' },
},
nfc: {
name: 'NFC',
ios: { using: 'name', value: 'NFC' },
android: { using: 'text', value: 'NFC' },
},
patrol: {
name: 'Patrol',
ios: { using: 'name', value: 'Patrol' },
android: { using: 'text', value: 'Patrol' },
},
presetPoints: {
name: 'Preset Points',
ios: { using: 'name', value: 'Preset Points' },
android: { using: 'text', value: 'Preset Points' },
},
privacyMode: {
name: 'Privacy Mode setting',
ios: { using: 'name', value: 'Privacy Mode' },
android: { using: 'text', value: 'Privacy Mode' },
},
faq: {
name: 'FAQ',
ios: { using: 'name', value: 'FAQ' },
android: { using: 'text', value: 'FAQ' },
},
saveButton: {
name: 'Save button',
ios: { using: 'name', value: 'Save' },
android: { using: 'text', value: 'Save' },
},
addButton: {
name: 'Add button',
ios: { using: 'name', value: 'Add' },
android: { using: 'text', value: 'Add' },
},
sensitivity: {
name: 'Sensitivity',
ios: { using: 'name', value: 'Sensitivity' },
android: { using: 'text', value: 'Sensitivity' },
},
talkVolume: {
name: 'Talk Volume',
ios: { using: 'name', value: 'Volume' },
android: { using: 'text', value: 'Volume' },
},
detectionZone: {
name: 'Detection Zone',
ios: { using: 'name', value: 'Detection Zone' },
android: { using: 'text', value: 'Detection Zone' },
},
};