'Shorthand to click on a link/button, show a modal dialog, then accept it.
Use the fixed quirks on PhantomJS/GhostDriver on modal dialogs and clicking on anchor tags.
See comment on `hacks_for_phantomjs()` method above.'

def browser_click_and_accept(self, selector, sleep=1, text=None):

    self.browser_click(selector)
    alert = self.browser_accept_alert(sleep=sleep, text=text)
    return alert
