Adding support for programmatic clicks and deeplinks.

Tests are in the next commit (can't test if they pass on my local machine)
Tests for programmatic clicks.