UI handlers

Sometimes, you need to test a process that would normally take input from the user. For example, you write a test to post a sales order, but the posting routine normally pops open a dialog to ask the user whether they want to ship, invoice, or ship and invoice the order. Obviously, in an automated testing scenario, we cannot have the test wait for a user to interact with it.

This is where the UI handlers can be used. They allow us to write a test that has user interaction, and we can write the appropriate data to process that interaction.

This recipe will show you how to handle a confirmation dialog using a UI handler.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset