mercredi 4 août 2021

Detecting window in sap gui script with if condition

There is attached sap window SAP window. How I can detect if that window appears? It is not pop up window. Tried code below but it does not work. It stops without error message and says completed and that window in the picture remains on screen. Everything else before this code works. I need to go just back from that window and then save a production order.

If session.findById("wnd[0]").text = "Message log created on" then session.findById("wnd[0]/tbar[0]/btn[3]").press 'If popup message log appears then press button Back

Else session.findById("wnd[0]/tbar[0]/btn[11]").press 'Save production order

End if

session.findById("wnd[0]/tbar[0]/btn[11]").press 'If previous if sentence is true press save after that

Aucun commentaire:

Enregistrer un commentaire