HTML of the button.
<div id="MainTab" aria-disabled='true'>
when button is not clickable, aria-disabled = 'true'
as:
<div id="MainTab" aria-disabled='true'>
when button is clickable, aria-disabled
is not present as:
<div id="MainTab">
How to write a code to identify whether aria-disabled
attribute is present or not in:
<div id="MainTab" ...>
The element "MainTab" is always visible.
"aria-disabled" is true, "MainTab" is disabled, not clickable
"aria-disabled" is false, "MainTab" is enabled and clickable
How do I use wait.until()
to probe either "MainTab" is disabled or clickable? The purpose is to probe when "MainTab" is clickable, then execute
FindElement(By.Id("MainTab")).click();