Thank you for contacting us.
Unfortunately I am not able to reproduce the issue. I executed your code and everything worked as expected.
I have modified it slightly.
1. Remove Return false from the IF block.
2. Add Else block which will contain the click step.
Give that a try and let us know the result.
Hope to hear from you soon.