Forum Discussion
One approach you can try is to use the "Aliases" feature in TestComplete to handle the object naming differences between Windows 10 and Windows 11.
Aliases allow you to create a custom name for an object that you can use in your test scripts.
This way, you can create an alias for the "toolbar" object in Windows 10 and another alias for the "toolbarAddressE" object in Windows 11, and use the appropriate alias depending on the platform you are running the test on.
To create an alias, you can follow these steps:
1. In the Object Browser, right-click the object that you want to create an alias for and select "Create Alias" from the context menu
2. In the "Create Alias" dialog, enter a name for the alias and click "OK".
3. In your test scripts, you can use the alias name to access the object. For example, you can use "Aliases.toolbar" to access the "toolbar" object in Windows 10 and "Aliases.toolbarAddressE" to access the "toolbarAddressE" object in Windows 11.
4. To switch between the aliases depending on the platform you are running the test on, you can use conditional statements in your test scripts. For example, you can use an "if" statement to check the operating system version and use the appropriate alias based on the result.
I hope this helps! Let me know if you have any questions or need further assistance.
Edit: Formatting
Related Content
- 3 years ago
- 11 years ago
- 7 years ago