SOAP-1416 Improved synchronization in JavaScript automation GUI