Command: AutoPressNextPopup

Previous  Next |  Direct link to this topic

Go to list of all Commands

Syntax: AutoPressNextPopup(<target>|<timeout>);

The AutoPressNextPopup Commands are used to automate/suppress SAP Message-boxes and Prompts.

image434

Video:
- Intro video: B1UP Tip of the feature
- E-learning: How to use the AutoPressNextPopup command

Important: In order to work you need to call this command BEFORE you execute the command that cause the popup. The command can be called with either zero, one or 2 commands.

 

Command variants

Description

AutoPressNextPopup();

Will press the default button on the next Messagebox / Prompt that will appear within the next 5 seconds

image434
(In a case like this it would be the Yes button that would be pressed as that is the default)

Samples: AutoPressNextPopup(); press next popup's default button if it happen within 5 sec.

AutoPressNextPopup($[$<item>.0.0]);

Will press a button the you choose  on the next Message-box / Prompt that will appear within the next 5 seconds

 

$[$item.0.0] argument:

On a pop-up box there can be multiple options (OK/Cancel, Yes/No, Yes/No/Cancel, etc.).

If you want the default button you don’t need to provide this command and B1UP will choose for you but you want a certain result you need to provide the Item Uid of the button you wish to press.

 

Sample: AutoPressNextPopup($[$2.0.0]); press next popup's button with Uid = 2 if it happen within 5 sec.

image434
(In the sample item 2 is given as argument and result in the No button being pressed)

AutoPressNextPopup($[$<item>.0.0]|timeout);

Works as above but you also provide a timeout in seconds of the allowed auto-press

 

Timeout argument:
In order to prevent that misconfigurations and unforeseen scenarios because unintended auto presses if the intended fails, the Command have a built in timer-function that dismiss an auto-press if the popup does not appear within 5 secs of calling the command. 5 sec is commonly more than enough, but if you have a very long operation you might need to raise the timeout to a higher value than the default 5 sec.

 

Sample: AutoPressNextPopup($[$2.0.0]|10); press next popup's button with Uid = 2 if it happen within 10 sec (overridden timeout).

image434
(In the sample item 2 is given as argument and result in the No button being pressed if the pop-up appear within the next 10 seconds after call of this command. If the System message appear later than 10 seconds it will not be automated)