HAM ATF Tests for sourcing an asset from Local Stock

Tracey Wilmot
Tera Contributor

Hey all!

I'm trying to write an ATF Test to source an asset from local stock in preparation for our upgrade.

The HAM Quick Start test uses the procurement option but we never use this so wanted to consume from local stock.

I get as far as verifying that the Source Request UI Action is visible and can't get any further.

When opening the Source Request task, we would select "Consume" to fulfil the request from local stock.

Has anyone been able to achieve something similar with an ATF test and be happy to share?

TraceyWilmot_0-1779210506933.png

 

1 REPLY 1

pr8172510
Tera Guru
Hey @Tracey Wilmot,
The buttons on the Source Request modal (Consume, Transfer, Purchase) have dynamic IDs (e.g., transfer_order_action_1668026060876). Because the numeric portion changes every time the modal opens, ATF cannot reliably locate the button using the standard "Click Modal Button" step .


Use the "Click Component (Custom UI)" test step instead.

 this step is designed specifically to handle UI elements (like buttons in modals or workspaces) that have unstable identifiers or are not captured by standard steps .

Add the Step: In your ATF test, add a Click Component (Custom UI) step after the modal opens .

Retrieve Components: Select Retrieve Components in the step configuration. The ATF Test Runner will launch and scan the page, creating a list of every interactive element on the screen .

Select the Button: The list will usually contain the button with a stable name (e.g., Consume). You may need to identify it by its unique, non-dynamic attributes (like name="consume" or a consistent part of its class) .

Save the step. The test will now click the correct button every time