IOSManager
TheIOSManager class provides iOS Safari automation via Appium with full feature parity to BrowserManager. It supports both iOS Simulators and real devices.
Prerequisites
Constructor
Device Management
listDevices()
List available iOS simulators.IOSDeviceInfo[]
listRealDevices()
List connected real iOS devices.IOSDeviceInfo[]
Array of connected physical iOS devices
listAllDevices()
List all devices (simulators + real devices).IOSDeviceInfo[]
Array of all available iOS devices (real devices first, then simulators)
Launch & Connection
launch()
Launch iOS Safari via Appium. Automatically boots simulator if needed and starts Appium server.object
AGENT_BROWSER_IOS_DEVICE- Default device nameAGENT_BROWSER_IOS_UDID- Default device UDID
isLaunched()
Check if browser is launched.boolean
True if browser is launched
close()
Close browser and cleanup resources.Navigation
navigate()
Navigate to a URL.string
URL to navigate to
{ url: string; title: string }
Current URL and page title after navigation
getUrl()
Get current page URL.string
Current page URL
getTitle()
Get page title.string
Page title
goBack()
Navigate back.goForward()
Navigate forward.reload()
Reload the page.Element Interaction
click()
Click/tap an element.string
CSS selector or element ref
tap()
Alias for click() with semantic clarity for touch.string
CSS selector or element ref
type()
Type text into an element.string
CSS selector or element ref
string
Text to type
fill()
Clear and fill an input field.string
CSS selector or element ref
string
Value to set
check()
Check a checkbox.string
CSS selector or element ref
uncheck()
Uncheck a checkbox.string
CSS selector or element ref
select()
Select option(s) from dropdown.string
CSS selector or element ref
string | string[]
Value(s) to select
clear()
Clear an input field.string
CSS selector or element ref
focus()
Focus an element.string
CSS selector or element ref
hover()
Hover over element (scrolls into view on iOS).string
CSS selector or element ref
Keyboard
press()
Press a key.string
Key name (Enter, Tab, Escape, Backspace, Delete, ArrowUp, ArrowDown, ArrowLeft, ArrowRight)
Scrolling & Gestures
scroll()
Scroll the page or an element.object
swipe()
iOS-specific swipe gesture.'up' | 'down' | 'left' | 'right'
Swipe direction
Snapshots & Element Refs
getSnapshot()
Get page snapshot with element refs.IOSEnhancedSnapshot
getRefMap()
Get cached ref map from last snapshot.IOSRefMap
Map of refs to element data
Element Queries
getText()
Get element text content.string
CSS selector or element ref
string
Element text content
getAttribute()
Get element attribute value.string
CSS selector or element ref
string
Attribute name
string | null
Attribute value or null
getContent()
Get page or element HTML content.string
Optional CSS selector or element ref
string
HTML content
isVisible()
Check if element is visible.string
CSS selector or element ref
boolean
True if element is visible
isEnabled()
Check if element is enabled.string
CSS selector or element ref
boolean
True if element is enabled
count()
Get count of matching elements.string
CSS selector
number
Number of matching elements
getBoundingBox()
Get element bounding box.string
CSS selector or element ref
{ x: number; y: number; width: number; height: number } | null
Bounding box or null if element not found
Screenshots
screenshot()
Take a screenshot.{ path?: string; base64?: string }
Screenshot result with path or base64 data
JavaScript Execution
evaluate()
Execute JavaScript in page context.string
JavaScript code to execute
unknown[]
Arguments to pass to the script
T
Script execution result
Wait Functions
wait()
Wait for element or timeout.object
Device Info
getDeviceInfo()
Get current device information.{ name: string; udid: string } | null
Device info or null if not launched