'How to validate if the option is selected on native application by using Appium Library?

How to check if the button is selected when the locators and attributes are exactly the same when inspecting the element when it isn't selected or selected on a native iOS application by using appium library (robot framework)?

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source