Selenium Webdriver C# element.Enabled evaluating to true when element is still disabled -
my automated tests used run smoothly, moved qa environment different server, , tests failing because keeps tries click on elements still loading , greyed out/disabled. here part of code worked fine on previous server:
while ( less 7 seconds ) if (driver.findelements(by).count > 0) { if (driver.findelement(by).enabled && driver.findelement(by).displayed) break; } else { go while loop }
the problem driver.findelement(by).enabled keeps evaluating 'true' (i found out during debugging) when page still loading , entire page still greyed out, causing driver proceed seek click on greyed out element, , of course of study test fails exception. has encountered kind of issue? utilize webdriver c# , nunit, run test in ie. thanks.
the enabled method works input elements , radio buttons. non input elements utilize getattribute("disabled"). homecoming "true" if disabled="disabled", or null if still enabled.
c# selenium-webdriver
No comments:
Post a Comment