Why script does not run when going through ALM

ALM v17

UFT 24

I have several tests that run on normal and fast mode without any issue directly through UFT.

When these same tests are called from ALM, they fail.

I am out of ideas on what to fix when I cannot get it to fail when using UFT direct. And, as you know, I am not able to debug or intervene when it is launched through ALM.

I am confused to why this should happen at all as I believe, all ALM does is launch UFT and UFT runs the actions as per setup.

So why is it failing??

I have found in many places, that putting in waits to slow it down will allow it to work - but - I would rather not put in hard coded waits for something that works correctly on fast mode through UFT direct.

One issue is the AI that I have.

Last SAP upgrade made one of the object change whereby the only way I can capture it now, its with AI

The following code sees that the object exists and then captures the message text

AIUtil.SetContext Window("regexpwndtitle:=Asset Explorer", "regexpwndclass:=SAP_FRONTEND_SESSION", "is owned window:=False", "is child window:=False") 

If AIUtil.FindTextBlock("No postings for selected fiscal year").Exist(2) Then
   Msg = AIUtil.FindTextBlock("No postings for selected fiscal year").GetText

When I run this through ALM, the object does not exist, so no message text is captured - test fails.

Another example - the following does not save the selections and SAP throws error to select the Fix

again - this works on fast mode of UFT direct - only fails when launched through ALM

'When "FIX DESCRIPTION NOT FOUND - L2 TO ASSIGN" has been applied, the Supervisor must fill in this Fix section
If Browser("Supervisor").Page("Supervisor").Frame("Supervisor").WebElement("Fix Error Warning").Exist(1) Then
    If DataTable("Task", dtGlobalSheet) = "FIX DESCRIPTION NOT FOUND - L2 TO ASSIGN"  Then
        'Select random Task
        'Select random Sub Category
        'Select random Position when required

    Browser("Supervisor").Page("Supervisor").Frame("Supervisor").SAPUIButton("OK").Click
    Browser("Supervisor").Page("Supervisor").Frame("Supervisor").WebButton("Submit").Click

Tags:

  • 0  

    is AI installed\enabled on the machine which the test is run from ALM?

  • 0   in reply to   

    Not quite sure I understand your question.

    I am working of my laptop which has UFT loaded on it which being version 24.2, has AI imbedded

    ALM is running from a server location, but I am unaware of being able to do any setting in ALM for AI

    And in my example above, it is not just the AI step that is failing

    And I will add that I have another piece of code that is AI and that happens to run fine.

    My question is really about why it runs with no issues directly through UFT but fails when run through ALM

    I was told ALM v17, UFT 24.2 & SAP 800 work hand in hand and they do directly through UFT but not through ALM

    And - isn't ALM just an engine to run UFT??

  • 0   in reply to   

    if the UFT instance, run locally or remotely from ALM, is the same one, then it should work. there can be various reasons that may cause the failure. please reach out to the Support team for further investigation. ALM has no AI configuration, that is correct.