About Basic Ajax Example

This form is populated Dynamically when a 'Category' is selected. Submit the form to see the results page.

Dynamic HTML Form

JavaScript can be added a form so that the form is populated dynamically.

In this example, when you select something from the Category, a call is made to the server to populate the second combo.

This can be hard to automate because we have to synchronise and wait till the drop down is ready.

When you submit the form by clicking Code In It then the selected options will be sent to the 'results' page and you can assert that the values are correct.

What is AJAX?

AJAX means (Asynchronous JavaScript) where JavaScript issues an HTTP request to the server and the response is processed in the background so the results are not immediately shown on the page.

This requires effective synchronization when automating the application.

Bug

This form has a deliberate bug in it.

See if you can find it, and write an effective defect report.

If you are automating then you may have to code a 'workaround' as well as identify the defect.

Help keep this site free by joining our Patreon Membership site. Membership costs as little as $1 a month and includes access to exclusive e-books and online training courses.