Hi all!
I hope anyone using SAP here with robot, namely this is the SapGuiLibrary.
I have managed to store some variables encapsulated in a class, then referencing those across different files.
The point is that our SAP application has kind of long locators, which are including the connection, session and window count.
They looks like this: f'/app/con[{con}]/ses[{ses}]/wnd[{wnd}]{appendix}'
where the appendix is the element_id
of the SAP GUI element.
So all good, except when opening a new window, the test is exiting with an error, saying it doesnt find the element with correct locator . The locator sure good, according to the scripting tracker.
Thanks in advance
Hi Tamás,
I don’t do much SAP GUI testing myself, but I I’ll suggest you have a look at the robosapiens Library from what I understand it’s designed to make things like this easier.
Otherwise, almost everything in Robot framework can be constructed with variables, so you could create variables like this:
VAR ${SAP_Connection} /app/con[{con}]/ses[{ses}]
VAR ${my_SAP_Window} ${SAP_Connection}/wnd[1]{appendix}
Click Element ${my_SAP_Window}/elementid1
VAR ${next_SAP_Window} ${SAP_Connection}/wnd[2]{appendix}
Click Element ${next_SAP_Window}/elementid2
Hope that helps,
Dave.
Hi there! It sounds like you’re doing great with SAPGuiLibrary and Robot Framework. However, you’re encountering issues with long locators when opening a new window. To resolve myOneonta this, ensure the new window is fully loaded and active before interacting with it, double-check the locator’s accuracy, consider using dynamic locators, and implement error handling to manage exceptions.