UIASegmentedControl

Hi,

I have a native app. On a search screen is a UIASegmentedControl with three buttons. When the page loads, one will be “highlighted” depending on the route taken to the page. The test needs to validate that a certain one is “highlighted”. I grab the button, and I’ve tried IsSelected and IsEnabled… but they aren’t the correct methods to use.

How can i check which one is shown to be selected?

Thanks

Has anyone tried this?

I’ve worked out how to do this (in case any of you out there have the same question)

name = driver.findElementByIosUIAutomation(".segmentedControls()[0].selectedButton()").getText();

How to use the above line.? Can you throw some more details.?