http://www.perlmonks.org?node_id=689596


in reply to Can't call method "click" on an undefined value

In short, it sounds like you have three problems, one of which hasn't been mentioned yet.