Button.Enabled returning True for disabled button
- 10 years ago
Hi Shiva,
Welcome to the 'creative' world of web development... :)
Like all other guys have already said, there are usually a lot of ways to do this or that thing with the web object and different approaches might be used within the given tested web application depending on development team, used libraries, etc.
For example, the object may have .Visible property set to True, but be invisible on the page because: its height or width is set to zero; or because some class or style is applied to it (or its parent) that makes it not visible; or because one of its parents is not visible; or...
Note, that the opposite is also correct: if the parent of some object is not visible (or disabled) this does not necessarily mean that the object itself is not visible (or disabled) as well. So web test code should not rely on the parent's properties, but also check actual properties of the object itself.