Hi SAP community,
We have CBTA scripts were running successfully on Fiori Apps. After upgrading S/4 HANA to 2021, CBTA scripts are not running. Error log on CBTA shows the following.
2023-02-02 09:39:43,647 | ERROR | 1 | TADGlobal | Failed to set browser as the foreground window.
2023-02-02 09:39:52,693 | ERROR | 1 | TADGlobal | Failed to set browser as the foreground window.
2023-02-02 09:39:56,600 | ERROR | 1 | TADGlobal | Failed to search Element ***
Uri: label=Purchase Requisition; frameId=ITSFRAME1; ls.type=CB; tag=TABLE;
ls.sid=wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB0:SAPLMEGUI:0030/subSUB1:SAPLMEGUI:3327/cmbMEREQ_TOPLINE-BSART ***
Error: SAP.TestAutomationDriver.Api.Player.PlayerHelperException:
SearchObject failed - Frame Container not found.
Uri:label=Purchase Requisition; frameId=ITSFRAME1; ls.type=CB; tag=TABLE;
ls.sid=wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB0:SAPLMEGUI:0030/subSUB1:SAPLMEGUI:3327/cmbMEREQ_TOPLINE-BSART
at SAP.TestAutomationDriver.Wdp.WdpResolver.SearchObject(UriFragment
uriFragment, IResolutionContext context, IResolutionContext&
currentContext)
at
SAP.TestAutomationDriver.Api.Resolver.UriResolver.SearchObject(UriFragment
uriFragment, IResolutionContext context, IResolver& selectedResolver,
IResolutionContext& currentContext)
at
SAP.TestAutomationDriver.Api.Resolver.UriResolver.SearchObjectInContext(Uri
uri, IResolutionContext context)
Furthermore, the object spy is showing message.
Spy Disabled on several frames into current document ( Same Origin Policy – No CORS)

Additionally, I’ve analyzed the error messages in browser console. It shows the following error message.
TAF_SCRIPT.js:1291 CBTA UI5 script initialization...
11:26:25.003 TAF_SCRIPT.js:53 TAF ERROR: OPA5 is not available (1): Failed
to resolve dependencies of 'sap/ui/test/Opa5.js'
-> 'sap/ui/test/Opa.js'
-> 'sap/ui/test/_ValidationParameters.js'
-> 'sap/ui/test/matchers/matchers.js'
-> 'sap/ui/test/matchers/AggregationEmpty.js': failed to execute
module factory for ''sap/ui/test/matchers/AggregationEmpty.js'':
sap.ui.getCore is not a function
taf_SAPUIFive_Update @ TAF_SCRIPT.js:53
11:26:25.004 TAF_SCRIPT.js:56 Uncaught TypeError: Cannot read properties
of undefined (reading 'log')
at taf_SAPUIFive_Update (TAF_SCRIPT.js:56:16)
at TAF_SCRIPT.js:1295:3
Message 2
11:26:28.057 :8000/sap/opu/odata/UI2/INTEROP/PersContainers:1
Failed to load resource: the server responded with a status of 403
(Forbidden)
11:26:28.701 :8000/sap/opu/odata/UI2/INTEROP/PersContainers:1
Failed to load resource: the server responded with a status of 403
(Forbidden)
11:26:28.702 Log-dbg.js:452 2023-02-02 11:26:28.701500 Error (403,
Forbidden) in OData response for POST
"/sap/opu/odata/UI2/INTEROP/PersContainers": HTTP request failed - {"requestUri":"/sap/opu/odata/UI2/INTEROP/PersContainers","statusCode":403,"statusText":"Forbidden","headers":[],"body":"CSRF
token validation failed"} ODataWrapper
f @ Log-dbg.js:452
11:26:28.702 Log-dbg.js:452 2023-02-02 11:26:28.701899 Fail to set Personalization data for Personalizer container:
sap.ushell.services.UserRecents -
f @ Log-dbg.js:452
11:26:28.723 :8000/sap/bc/ui5_ui5…-ui-tech-hint=GUI:1 Uncaught (in
promise) undefined
11:26:28.916 taf_message_com.js:169 [ExtMsg][contentType id=e411ccbd7aa4] handle response action=getInitRecording url:https://xyzgroup.com:44300/sap/bc/gui/sap/its/webgui;~rfcHostName=192.168.191.14;~service=3200?sap-iframe-hint=GUI
11:26:28.918 taf_core.js:97 Blocked a frame with origin "https://xyzgroup.com:44300" from accessing a cross-origin frame. Error: Blocked a frame with origin "https://xyzgroup.com:44300 " from accessing a cross-origin frame.
at tafContent.log
(chrome-extension://kcejjhnklholdooalhmipjohiipejkln/content/taf_content.js:19:62)
at tafContent.init
(chrome-extension://kcejjhnklholdooalhmipjohiipejkln/content/taf_content.js:48:12)
at tafContent.responseHandler
(chrome-extension://kcejjhnklholdooalhmipjohiipejkln/content/taf_content.js:330:37)
at ExtensionMessageCommunication.handleMessage
(chrome-extension://kcejjhnklholdooalhmipjohiipejkln/library/taf_message_com.js:170:18)
at ExtensionMessageCommunication.handleChromeMessage
(chrome-extension://kcejjhnklholdooalhmipjohiipejkln/library/taf_message_com.js:194:10)
displayLog @ taf_core.js:97
I have tried with Crome, Edge, IE. All browsers are giving me the same message. Please help