In Geb, if you need to check if some element does exists on page or not the best looking way to do it is method
isPresent()
, so it can be called like:!notNeededLink.present
otherLink.present
Of course if you plan to check non-existing elements like this they need to be defined as not required and with wait - false. For example:
notNeededLink(to: SomePage, required:false, wait: false) {$('a', text:'Some')}
could it be applicable to a div.? I have a problem, I don't know how to check the div if present or not.
ReplyDeleteI'm using angularjs ng-show="variable that hold boolean from the Controller" to show div if the variable returns true...
ReplyDeletethanks Dmitrijs Artjomenko... its working...
ReplyDeleteBro thank you, been trying to find this answer for a day lol.
ReplyDeleteThis is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. script cek mutasi
ReplyDelete