This is what I usually do , I check for an element using element exists and if exists that is where I put the next process and then so on and if no element I just log a message .
Is this a good implementation , is there a better way compared to this ?. Thank you guys