Ranorex API Reference
Welcome to the Ranorex API Reference documentation. This section provides comprehensive technical documentation for all Ranorex classes, methods, properties, and events.
Overview
The Ranorex API is a powerful automation framework that enables you to create robust, maintainable test automation solutions. The API is organized into several key namespaces and assemblies:
Quick Start
Essential Classes
| Class | Description | Common Usage |
|---|---|---|
| Host | Application host management | Initialize/shutdown automation |
| Report | Test reporting and logging | Log test results and status |
| Validate | Validation and assertions | Verify application state |
| Element | UI element representation | Interact with application controls |
| Repository | Object repository management | Centralized element management |
Common Operations
// Initialize Ranorex
Host.Initialize();
// Find and interact with elements
var button = Host.Local.FindSingle("//button[@text='Submit']");
button.Click();
// Validation
Validate.IsTrue(element.Visible, "Element should be visible");
// Reporting
Report.Success("Test Step", "Operation completed successfully");
// Cleanup
Host.Shutdown();
Key Concepts
Element Identification
Ranorex uses RanoreXPath expressions to identify UI elements:
- Absolute paths:
/form[@title='Login']/button[@text='Submit'] - Relative paths:
.//textbox[@class='username'] - Wildcards:
//button[contains(@text,'Save')]
Repository Pattern
Use repositories for maintainable element management:
var repo = MyAppRepository.Instance;
repo.LoginDialog.UsernameField.PressKeys("testuser");
repo.LoginDialog.PasswordField.PressKeys("password");
repo.LoginDialog.LoginButton.Click();
Error Handling
Implement robust error handling:
try
{
var element = Host.Local.FindSingle(path, timeout);
element.Click();
Report.Success("Click", "Button clicked successfully");
}
catch (ElementNotFoundException ex)
{
Report.Failure("Click", $"Element not found: {ex.Message}");
throw;
}
Architecture Overview
Automation Stack
flowchart TD
A[Your Test Code]
B[Ranorex API Layer]
C[Technology Plugins]
D[Ranorex Core Engine]
E[Operating System Layer]
A --> B --> C --> D --> E
Plugin Architecture
Ranorex uses a plugin-based architecture where each technology has its own specialized plugin:
- Web Plugin: Chrome, Firefox, Edge, Internet Explorer
- Desktop Plugins: WinForms, WPF, Win32, Qt
- Mobile Plugin: iOS (via Appium), Android (via Appium)
- Enterprise Plugins: SAP, Java applications
API Categories
Core Automation
| Namespace | Purpose | Key Classes |
|---|---|---|
Ranorex |
Main automation functionality | Host, Report, Validate |
Ranorex.Core |
Core element and repository management | Element, Repository, RanoreXPath |
Ranorex.Core.Testing |
Test management and execution | TestModule, TestCase, TestSuite |
Technology-Specific
| Plugin | Target Applications | Key Capabilities |
|---|---|---|
| Web | Browsers, web apps | DOM manipulation, JavaScript execution |
| WinForms | .NET Windows Forms | Native control support, property access |
| WPF | WPF applications | XAML element support, data binding |
| Mobile | iOS/Android apps | Touch gestures, device interaction |
Utilities and Extensions
| Area | Classes | Purpose |
|---|---|---|
| Data Handling | DataConnector, DataSource | External data integration |
| Image Recognition | ImageFinder, Template | Visual element identification |
| Timing | Delay, Timeout | Wait and timing operations |
| Validation | Validator, CompareValidator | Custom validation logic |
Getting Started Guides
For Beginners
- Basic Setup - Configure your development environment
- First Script - Create your first automation
- Element Identification - Learn RanoreXPath basics
For Developers
- API Usage Examples - Practical code examples
- Advanced Patterns - Enterprise-level automation
- Best Practices - Proven automation patterns
Advanced Topics
Custom Extensions
Extend Ranorex functionality:
public static class ElementExtensions
{
public static void SafeClick(this Element element, int retries = 3)
{
for (int i = 0; i < retries; i++)
{
try
{
element.Click();
return;
}
catch (ElementNotFoundException)
{
if (i == retries - 1) throw;
Delay.Milliseconds(500);
}
}
}
}
Performance Optimization
- Element Caching: Reuse found elements when possible
- Timeout Tuning: Optimize search timeouts for your application
- Parallel Execution: Run independent tests concurrently
- Resource Management: Properly dispose of resources
Integration Patterns
- CI/CD Integration: Azure DevOps, Jenkins, GitHub Actions
- Data-Driven Testing: Database, Excel, CSV integration
- Custom Reporting: External reporting systems
- Test Management: Integration with test management tools
API Reference Navigation
Ranorex
Classes
- ATag - HTML A element
- AbbrTag - HTML Abbr element
- Accessible - Accessible
- AccessibleTreeItem - AccessibleTreeItem
- AcronymTag - HTML Acronym element
- ActionFailedException - Exception class for ActionFailed errors
- ActionTimeout - ActionTimeout
- Adapter - Adapter
- AddressTag - HTML Address element
- AirWindow - AirWindow
- AlertBox - AlertBox
- AltGlyphDefTag - HTML AltGlyphDef element
- AltGlyphItemTag - HTML AltGlyphItem element
- AltGlyphTag - HTML AltGlyph element
- AndroidApp - AndroidApp
- AndroidElement - AndroidElement
- AnimateColorTag - HTML AnimateColor element
- AnimateMotionTag - HTML AnimateMotion element
- AnimateTag - HTML Animate element
- AnimateTransformTag - HTML AnimateTransform element
- AppletTag - HTML Applet element
- ApplicationNotRespondingException - Exception class for ApplicationNotResponding errors
- AreaTag - HTML Area element
- ArticleTag - HTML Article element
- AsideTag - HTML Aside element
- ... and 317 more classes
Ranorex.Core
Classes
- ActionDescriptor - ActionDescriptor
- Argument - Argument
- AttributeDescriptor - AttributeDescriptor
- WeightResolvingEventArgs - WeightResolvingEventArgs
- CacheSessionContext - CacheSessionContext
- CachedResourceManager - CachedResourceManager
- Capability - Capability
- CodeGenLanguage - CodeGenLanguage
- CommandLine - CommandLine
- Configuration - Configuration
- AbstractConfig - Configuration class for Abstract settings
- AdapterConfig - Configuration class for Adapter settings
- ConfigurationParam - ConfigurationParam
- CheckValueHandler - CheckValueHandler
- CustomConfigurationParam - CustomConfigurationParam
- DebuggerConfiguration - DebuggerConfiguration
- EffectiveDataSetDialogConfig - Configuration class for EffectiveDataSetDialog settings
- ImagingConfig - Configuration class for Imaging settings
- InputConfig - Configuration class for Input settings
- KeyValueStoreData - KeyValueStoreData
- KeyboardConfig - Configuration class for Keyboard settings
- ManageMobileDevicesFormConfig - Configuration class for ManageMobileDevicesForm settings
- ModuleGroupBindingDialogConfig - Configuration class for ModuleGroupBindingDialog settings
- PluginsConfig - Configuration class for Plugins settings
- Win32Config - Configuration class for Win32 settings
- ... and 72 more classes
Ranorex.Core.Data
Classes
- Column - Column
- ColumnCollection - ColumnCollection
- CsvDataConnector - CsvDataConnector
- DataBindingInfoBase - DataBindingInfoBase
- DataBindingType - DataBindingType
- DataCache - DataCache
- DataConnector - DataConnector
- DataConnectorBindingInfo - DataConnectorBindingInfo
- DataConnectorFactory - DataConnectorFactory
- CreateDataSource - CreateDataSource
- DataContext - DataContext
- DataException - Exception class for Data errors
- DataProviderContext - DataProviderContext
- DummyDataProvider - DummyDataProvider
- FileDataConnector - FileDataConnector
- IDataBindingInfo - IDataBindingInfo
- IDataContext - IDataContext
- IDataProvider - IDataProvider
- IVariableBindingContainer - IVariableBindingContainer
- ModuleGroupConstantValue - ModuleGroupConstantValue
- ModuleGroupVariable - ModuleGroupVariable
- ModuleVarItem - ModuleVarItem
- ModuleVarItemList - ModuleVarItemList
- ParameterDataBindingInfo - ParameterDataBindingInfo
- ReferencedVariableNamesArgs - ReferencedVariableNamesArgs
- ... and 7 more classes
Ranorex.Core.Remoting
Classes
- AppInformation - AppInformation
- ChannelState - ChannelState
- CodeDirectoryVersion - CodeDirectoryVersion
- CompatibilityCheckError - CompatibilityCheckError
- ErrorTypes - ErrorTypes
- DeployProcessChangedDelegate - DeployProcessChangedDelegate
- DeviceDiscoveredEventArgs - DeviceDiscoveredEventArgs
- DeviceOrientation - DeviceOrientation
- EndpointConnectorCollection - EndpointConnectorCollection
- EndpointRecorderConnector - EndpointRecorderConnector
- IDeviceDiscoveryService - IDeviceDiscoveryService
- IDeviceDiscoveryServiceFactory - IDeviceDiscoveryServiceFactory
- IIosOptions - IIosOptions
- IOptions - IOptions
- IRemoteElement - IRemoteElement
- IRemoteEndpoint - IRemoteEndpoint
- IRemoteEndpointInformation - IRemoteEndpointInformation
- IRemoteEndpointService - IRemoteEndpointService
- IScreenshotSource - IScreenshotSource
- IToolConfig - Configuration class for ITool settings
- ITools - ITools
- InstrumentIpaOptions - InstrumentIpaOptions
- PListAttribute - PListAttribute
- ParamsContract - ParamsContract
- ParamsContractEntry - ParamsContractEntry
- ... and 6 more classes
Ranorex.Core.Remoting.Data
Classes
- AndroidDeviceInfo - AndroidDeviceInfo
- Contact - Contact
- ContactCollection - ContactCollection
- DeviceInfo - DeviceInfo
- IgnoreInDeviceInfoToString - IgnoreInDeviceInfoToString
- IosDeviceInfo - IosDeviceInfo
- PhoneCall - PhoneCall
- PhoneCallCollection - PhoneCallCollection
- Sms - Sms
- SmsCollection - SmsCollection
Ranorex.Core.Reporting
Classes
- Activity - Activity
- ActivityContext - ActivityContext
- ActivityException - Exception class for Activity errors
- ActivityExecType - ActivityExecType
- ActivityStack - ActivityStack
- ActivityStatus - ActivityStatus
- ActivityVisitorDelegate - ActivityVisitorDelegate
- IActivity - IActivity
- IReportItem - IReportItem
- ITestContainerActivity - ITestContainerActivity
- ITestEntryIterationContainerActivity - ITestEntryIterationContainerActivity
- ITestFolderActivity - ITestFolderActivity
- ITestIterableActivity - ITestIterableActivity
- ITestModuleActivity - ITestModuleActivity
- ITestModuleGroupActivity - ITestModuleGroupActivity
- ITestSuiteActivity - ITestSuiteActivity
- IVideoRecordingProvider - IVideoRecordingProvider
- IntegrationsActivity - IntegrationsActivity
- IterationExecType - IterationExecType
- ReportEnvironment - ReportEnvironment
- ReportFileQualifier - ReportFileQualifier
- ReportFileInformation - ReportFileInformation
- ReportItem - ReportItem
- TestContainerActivity - TestContainerActivity
- TestContainerActivityType - TestContainerActivityType
- ... and 15 more classes
Ranorex.Core.Repository
Classes
- ElementRepository - ElementRepository
- Memento - Memento
- FileNameResolveEventArgs - FileNameResolveEventArgs
- FileNameResolveEventHandler - FileNameResolveEventHandler
- RefScreenshotStoreMode - RefScreenshotStoreMode
- RepoGenBaseFolder - RepoGenBaseFolder
- RepoItemInfo - RepoItemInfo
- RepositoryAppFolder - RepositoryAppFolder
- RepositoryClassGenerator - RepositoryClassGenerator
- RepositoryEntry - RepositoryEntry
- RepositoryFolder - RepositoryFolder
- MoveDisallowedReason - MoveDisallowedReason
- RepositoryFolderAttribute - RepositoryFolderAttribute
- RepositoryHelper - RepositoryHelper
- RepositoryImageAttribute - RepositoryImageAttribute
- RepositoryItem - RepositoryItem
- RepositoryItemAttribute - RepositoryItemAttribute
- RepositoryItemInfoAttribute - RepositoryItemInfoAttribute
- RepositoryRootFolder - RepositoryRootFolder
- RootedRepositoryFolder - RootedRepositoryFolder
- SimpleRepositoryFolder - SimpleRepositoryFolder
Ranorex.Core.Testing
Classes
- DataBindingManager - DataBindingManager
- DataConnectorManager - DataConnectorManager
- DataRange - DataRange
- DataRangeSet - DataRangeSet
- EnumDisplayNameAttribute - EnumDisplayNameAttribute
- ErrorBehavior - ErrorBehavior
- ErrorBehaviorTypeConverter - ErrorBehaviorTypeConverter
- FolderNode - FolderNode
- ICheckableEntry - ICheckableEntry
- ICheckableEntryHost - ICheckableEntryHost
- IEnumerableExtensions - IEnumerableExtensions
- IIterable - IIterable
- IModule - IModule
- ITestContainer - ITestContainer
- ITestModule - ITestModule
- ITestSuite - ITestSuite
- ModuleExecType - ModuleExecType
- ModuleGroupLeaf - ModuleGroupLeaf
- ModuleGroupNode - ModuleGroupNode
- ModuleGroupTable - ModuleGroupTable
- ModuleType - ModuleType
- ReportSettings - ReportSettings
- ReportTimeOption - ReportTimeOption
- SetupNode - SetupNode
- SmartFolderNode - SmartFolderNode
- ... and 19 more classes
Ranorex.Core.Testing.Interfaces
Classes
- IChildAllowedResult - IChildAllowedResult
- IRunnable - IRunnable
Ranorex.Core.Tracing
Classes
- CsvFileTraceWriter - CsvFileTraceWriter
- IPerfInterval - IPerfInterval
- ITraceWriter - ITraceWriter
- PerfInterval - PerfInterval
- PerfTimerContext - PerfTimerContext
- PerfTracers - PerfTracers
- PerfTracing - PerfTracing
Ranorex.Core.WinApi
Classes
- ComboBoxButtonState - ComboBoxButtonState
- CommonControls - CommonControls
- Hooks - Hooks
- ImeCompositionCallback - ImeCompositionCallback
- ImeHookStruct - ImeHookStruct
- ImeMessage - ImeMessage
- KeyboardMessage - KeyboardMessage
- LowLevelKeyboardHookCallback - LowLevelKeyboardHookCallback
- LowLevelKeyboardHookStruct - LowLevelKeyboardHookStruct
- LowLevelKeyboardHookStructFlags - LowLevelKeyboardHookStructFlags
- LowLevelMouseHookCallback - LowLevelMouseHookCallback
- LowLevelMouseHookStruct - LowLevelMouseHookStruct
- LowLevelMouseHookStructFlags - LowLevelMouseHookStructFlags
- LowLevelStruct - LowLevelStruct
- MouseMessage - MouseMessage
- ThreadProcDelegate - ThreadProcDelegate
- IImeHookInstaller - IImeHookInstaller
- ImagingUnsafe - ImagingUnsafe
- ImeHookClient - ImeHookClient
- Input - Input
- KeyboardInputFlags - KeyboardInputFlags
- MapVirtualKeyMapType - MapVirtualKeyMapType
- MouseInputData - MouseInputData
- MouseInputFlags - MouseInputFlags
- ListViewItemState - ListViewItemState
- ... and 21 more classes
Ranorex.Plugin
Classes
- AirInvoker - AirInvoker
- AirWindowFlavorElement - AirWindow control
- AirWindowRule - AirWindowRule
- AwtFlavorElement - Awt control
- AwtWebFlavorElement - AwtWeb control
- AwtWindowFlavorElement - AwtWindow control
- BucketInfo - BucketInfo
- ChildWindowsRule - ChildWindowsRule
- ChromeFlashInvoker - ChromeFlashInvoker
- ComUtil - ComUtil
- ComboBoxRule - ComboBoxRule
- ComboListBoxItem - ComboListBoxItem
- CommonControlsFactory - CommonControlsFactory
- DomWindowInfo - DomWindowInfo
- FirefoxFlashInvoker - FirefoxFlashInvoker
- FlexChildrenRule - FlexChildrenRule
- FlexChromeObjectRule - FlexChromeObjectRule
- FlexFirefoxObjectRule - FlexFirefoxObjectRule
- FlexFlavor - FlexFlavor
- FlexFlavorElement - Flex control
- FlexGridCellFlavorElement - FlexGridCell control
- FlexGridColumnFlavorElement - FlexGridColumn control
- FlexGridRowFlavorElement - FlexGridRow control
- FlexListItemFlavorElement - FlexListItem control
- FlexMenuItemFlavorElement - FlexMenuItem control
- ... and 225 more classes
Ranorex.Plugin.CustomControls.PosListBox
Classes
- WinFormsPosListBoxFlavorElement - WinFormsPosListBox control
- WinFormsPosListBoxItemCellFlavorElement - WinFormsPosListBoxItemCell control
- WinFormsPosListBoxItemFlavorElement - WinFormsPosListBoxItem control
- WinFormsPosLixBoxChildrenRule - WinFormsPosLixBoxChildrenRule
- WinFormsPosLixBoxRule - WinFormsPosLixBoxRule
Ranorex.Plugin.Oracle
Classes
- OraFrameFlavorElement - OraFrame control
- OraGroupFlavorElement - OraGroup control
- OraTextFieldLabelFlavorElement - OraTextFieldLabel control
By Assembly
- Browse by assembly to understand the overall structure
- Each assembly contains related functionality
- Start with
Ranorex.Corefor fundamental concepts
By Namespace
- Logical grouping of related classes
- Follows .NET naming conventions
- Use IntelliSense in your IDE for discovery
By Class Type
- Classes: Main functionality containers
- Interfaces: Contracts and extension points
- Enumerations: Configuration options and constants
- Delegates: Event handling and callbacks
Support and Resources
Documentation
- Getting Started Guide - Complete beginner's guide
- Developer Examples - Practical code samples
- Best Practices - Expert recommendations
Community
- Ranorex Forum - Community support
- Knowledge Base - Searchable articles
- Training Resources - Official training
Technical Support
- Professional Support: Enterprise-level assistance
- Consulting Services: Custom automation solutions
- Training Programs: On-site and remote training
Ready to start automating? Begin with the Getting Started Guide or dive into practical examples to see the API in action.