Skip to content
  • There are no suggestions because the search field is empty.

Automating drop-down list testing in Unity

Learn how to automate the use of a drop-down list in Unity using GameDriver

To access OptionData from a dropdown list, the straightforward approach may be to return the list to the API client and then use Custom Serialization to access the text within. 

s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction69045860163original0fqb7GyXFgy_Zdun0W9JpvN87AciW0U4lA-3

An easier approach would be to access the text directly as seen in the example.

api.GetObjectFieldValue<string>("//*[@name='Dropdown']/fn:component('UnityEngine.UI.Dropdown')/@options[1]", "text");

In this example, the index predicate is used to access the individual list item, and then the text property.