difference between visible() and valid()

Ask general questions here.
mapa
Posts: 22
Joined: Tue Jun 06, 2017 7:29 am

difference between visible() and valid()

Post by mapa » Wed Aug 02, 2017 7:25 am

Hello guys,

can you please tell me where the difference between the visible- and valid-method is ?
In my opinion is an object valid when it is visible and also the other way round.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: difference between visible() and valid()

Post by krstcs » Wed Aug 02, 2017 1:51 pm

Visible ONLY means that the element is in the viewable area of the screen/window.

Valid means that Ranorex believes the element is still valid (the element hasn't moved, disappeared, etc.)

They are not strictly related. There is some overlap in their return value in certain situations, but there is no rule that requires one's value to depend on the other's.
Shortcuts usually aren't...