code: def check_alert(step, text):
      
  
      try:
          alert = Alert(world.browser)
          assert_equals(alert.text, text)
      except WebDriverException:
          # PhantomJS is kinda poor
          pass
docs: Check the alert text