implement withFrame, withPopup, and waitForPopup

Thanks to @asciidisco for the original idea to get this done

close #30