CM: add wait for popup
Merge pull request #2 from chetmancini/improve-casper-api

CM: add wait for popup