You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D
Hi. I am attempting to select a dynamic element, the element name PF_GameTile(Clone) is not unique, with other elements sharing the same name. (see screenshot top left). The only difference seems to be the game reference name within the Game Tile component. (bottom right) How can I find this object?
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D, chwi...@gmail.com
Hi, we don't have a specific command to do this so it will no be straightforward. What you can do is the following:
use FindObjects() to get all PF_GameTile(Clone)
with a for go though every object and check with GetComponentProperty to get the game it references.
If you get the right game then you got the object you are looking for.
Christopher Williams
unread,
Jun 17, 2020, 9:38:28 AM6/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D, chwi...@gmail.com
Thank You so much. I am trying to figure out GetComponentProperty. I am not sure I am doing this right and the test is still failing. Also I am trying to click the particular component. Can you please explain what I am doing wrong and how to go about clicking the particular component I need. See attachment for my current code. Thank You
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to altuni...@altom.com, chwi...@gmail.com
The component and the property are wrong. Component name should be the name of the class name: GameTile from what I see from screenshot, and the property name: game or Game.
To find your object you do something like this inside the for:
if("Wingspan Game".Equals(altElement.GetComponentProperty(componentName,propertyName)) searchedObject=altElement;// Or whatever operation you want to do with it
If you want to click the object you can do the following: searchedObject.Tap()
Christopher Williams
unread,
Jun 17, 2020, 10:25:18 AM6/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D, chwi...@gmail.com
Thank You rober for your quick response. I am new to altunitytester and c#. I have one more screenshot of the updates. I still am getting failures. I think it maybe in the if statement. Am I supposed to do altElement.Tap();
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D, chwi...@gmail.com
You probably getting ComponentNotFound. I don't think you should have spaces. You better check the script class name because UnityEditor shows in a more user friendly way. It is important to put the name of the class how it is declared so it should be "GameTile". Let me know if this still doesn't work. Also please add what error message you get.
Message has been deleted
Christopher Williams
unread,
Jun 17, 2020, 1:39:06 PM6/17/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AltUnity - UI test automation tool for Unity3D, chwi...@gmail.com