over 2 years ago

Conditionals in Transactions for WPM

It would be great if there were a way to test for something and only perform the following block of actions if the test passed (or failed).

For example, test for the presence of a particular element/widget on a page.  If the widget wasn't found, then perform the following actions which would add it to the page.

The lack of this is currently causing some difficultly in testing our one of our products.  A customer is limited to X number of widgets on the page.   I want to test to make sure one of the widgets is working.  So I login, add the widget to the page, test the widget, then log out.  This was working great in development.

I came in today to find that the test had been failing all weekend because there were too many widgets on the page and it wouldn't let me add a copy of the test widget anymore.

It would be nice if I could first see if it were already there and then only add it if not found.  

  *   Login to

  *   Goto widget tab

  *   Check if a particular widget already loaded

     *   Load widget if it wasn't found

  *   Test widget

  *   Logout

Conditionals in tests would solve all kinds of issues.