I am using a macro in an Excel file that runs the SAP GUI. There is a step where, when I click a button in SAP there will be another window that pops up.
For that I have written a code like this:
session.findbyid("wnd[0]/XX/btnXX").press
session.findbyid("wnd[1]/XX/btnXXX").press
There is a button (btnXXX
) in the window (wnd[1]
). But when I execute this query, I am getting an error object not found for findbyid
.
When I keep the break point and execute it, it is throwing error on 2nd line in the above code. I try to pick the activewindow.name
and it shows wnd[0]
still. Here the issue is wnd[1]
is not getting opened.
Does somebody know why the 2nd "button press" doesn't work?