Hi,
I want to get the attribute of the toggle button in an android app.
There are few posts mentioning the I can use get_attribute to get the “checked” property.
But when I try that I get this error,
find_element(:id,"au.com.x:id/btn_switch").get_attribute("checked")
NoMethodError: undefined method `get_attribute’ for #Selenium::WebDriver::Element:0x4452200866329d26 id=“9”
I am using Appium with ruby. I tried the above in ruby console(arc)
Is there any other way to get the attribute of the toggle button ? I want to check if the toggle button is on or off