Showing results for 
Search instead for 
Did you mean: 

Device loop does not return correct value for Aliases.Device.Name

Occasional Visitor

Device loop does not return correct value for Aliases.Device.Name

I have a very simple device loop. And i have 2 devices connected to my laptop. One is an android device SM-G960W and another is an iphone.


The issue i am noticing is that, when i put a debug point on the Log message here and check the value of the following, they return different values. Since 2 devices are connected, the above test will run for 2 iterations tellthebell.


While Mobile.Device().Name is returning the correct value, Aliases.Device.Name is always returns the 1st device that i connected to my machine out of the 2 devices connected. In the case above, Android device is connected first and Aliases.Device.Name is returning the android device for both the iterations.

Community Hero

Re: Device loop does not return correct value for Aliases.Device.Name

First, I'm moving this thread to the Mobile discussion group here.


Secondly, I'm curious as to how the Device of Aliases.Device is mapped.  If it's generic, then it will grab only the "first" device.  You may need to define multiple nodes in your NameMapping to correspond to your multiple devices.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Community Manager

Re: Device loop does not return correct value for Aliases.Device.Name

Thanks for the suggestion tristaanogre! 

Hi @Nessiogs , please share you progress so far. Were you able to solve this? Thanks. 

Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API


Comparing content of HTML table with Excel file data


Compare HTML table with Excel file and correct data in the file


Retrieve Data from a Web Page

Top Kudoed Authors