MDL-44401 assign: added behat script & new definitions to handle alert dialog

The behat script is to test the batch action to lock and unlock submissions.
The new definitions are to prevent the "unexpected alert open" error in Selenium.