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. 

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.