cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I have several questions

1. Is it possible to not traverse object tree each time i want to access specific field?

So far i use Object.children.item() and so on. But it seems that anyway SAP traverse all the elements.

I thought it would be more performant but after profiling it seems not.

How to avoid that? Keep some kind of cache to access elements directly

2. Some GUI events doesn’t work: Hit, Error.

I catch them from Session object (Session_Hit, etc).

CreateSession and DestroySession works just fine.

The idea is same as built-in recorder: listen to user events and record script but with different payload (trying to avoid continuous session.FindById... and make element names human-readable).

Thank you in advance!

0 Likes
View Entire Topic
former_member237609
Participant
0 Likes

Hi everybody. Sorry for such a late reply.

It seems that there's misunderstanding.

Set ScreenA = Session.FindById("BLA")

Set ScreenB = Session.FindById("BLABLA")

ScreenB.DoubleClick 'entered 2nd screen.

ScreenB.MoveBack 'entered 1st screen.

ScreenA.Text 'object is not available anymore because SAP cleaned reference.

Set ScreenA = Session.FindById("BLA") 'so you've to find it again which is obviously costy. I often faced with such an operation in loop where you have to switch between 2 screens.

So the original question is that how can i keep reference to ScreenA between screen change?

I think it's limitation of host application (SAP) so its should be changed from there. But maybe there's some workaround exist which i'm unaware of.