Running on a specific device, when 2 are connected, defaults back to the 1st connected.
- 6 years ago
Hi,
You did not mention it initially, but assuming that both devices are with iOS, I would say that you are getting expected behaviour.
> Aliases.Device.processApplication.window0.toolbar0;
The case here is that when TestComplete resolves the above line of code, it tries to find the device that meets its identification criteria - i.e. the device with iOS. As soon as such device is found, TestComplete continues with the found device (as it has no reasons to behave differently) and looks for the processApplication object on this device.
You may consider these options to cope with this problem:
a) Add device name as one more identification parameter for Device object and set it (parameter) to get its value from the project variable (which you initialize to the required value at test start);
b) If you can guarantee that processApplication is running on the device, you may switch to the Required Children pane for the Device object (see your screenshot) and set processApplication as a required child. With this setting, TestComplete will be instructed to identify device not only by the OS name, but also look for the running application. And if the application is not found for the first device, TestComplete will check another device.
Hope, the above made things more clear.