For my automation project I want to check the state of a switch button on a website.
The problem is that the ui element is always recognized identically (no matter if the button shows “ON” or “OFF”). I tried ‘get text’ (output is empty) and ‘get attribute’ (always shows “enabled”) activities to find the status of this button but it does not work (shows always the same attributes).
I want to disable the push function of this website (so I want to check if the push function is disabled, if not then click to disable).
I’m running out of ideas. Any adivce how I can check the button and disable if needed?
Get Attribute may work in this scenario, try using different attribute which shows the state of the Toggle button. Indicate the element again by using Get attribute activity and search for the best attribute.
Orelse
Check after Toggling the button to ‘on’ check any of the element is changing in all over the page. If any of the element changes then use that element to check Toggle is off or on.
aastate attribute will not work in this scenario… @SenorChang
Search for the attribute which shows on or off, enabled or disabled, True or False. If you are not able to figure out share me the screenshot of all attributes which shows in the Get Attribute activity.
No, Click on down arrow button beside the field where you have highlighted. Then it will show the list of attributes, it’s values and descriptions. Then select the attribute which useful for you… @SenorChang