Add waitForNthSelector.

This function has been working well for me for quite some time.