Skip to content

waitForConfirmation (UI Automation - Synchronization)

Compatible with:
  • Purpose
  • This command is used to wait till the most recent JavaScript alert has confirmed.By default, the confirm function will return true, having the same effect as manually clicking OK. 
  • NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog. NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.
  • Syntax
  • waitForConfirmation(pattern)
  • Target
  • pattern(the message of the most recent JavaScript confirmation dialog)
  • Value
  • N/A
  • Return Value
  • the message of the most recent JavaScript confirmation dialog
 
 

Feedback and Knowledge Base