Skip to Content
0
Oct 31, 2018 at 04:53 PM

Pressing a button periodically (timer)

119 Views

Hi,

I have a Screen Personas flavor with an ALV. I'd like to update the table every 5 seconds.

The flavor also includes a "Refresh" button for the ALV.

I am able to "press" this button with the following code:

session.findById("wnd[0]/tbar[1]/btn[8]").press();

How can I press the button periodically?

I bound the following script to the onLoad event. But this did not work:

var f_refresh = function doIt(){ 

session.findById("wnd[0]/tbar[1]/btn[8]").press(); 

}; 

window.setInterval(f_refresh, 5000); //wait 5s

Any ideas?

Best regards

Frank