1.1 Popup window processing keyword 5.8.1 Alert should be present keyword
Press F5 to see a description of the alert should be present keyword, as
Alert should be Present [text=]
To verify that the warning box is available, the parameter text= fills in the warning box prompt, or it can be empty, and if the argument "text" is a non-empty string, it also confirms that the message for the alert is equal to "text". If the parameter "text" is inconsistent with the actual output, the test result validation fails.
Project Example one: (Verification success example)
Code implementation:
Note: If the parameter "text" is a non-empty string, it also confirms that the alert message equals "text".
Operation Result:
Project Example two: (Verification failure example)
Code implementation:
Operation Result:
5.8.2 Get Alert Message keyword
Press F5 to see a description of the Get Alert message keyword, such as
Get Alert Message
Used to get a warning message, usually we pass the obtained text to a variable and print the result for viewing.
Project Examples:
Code implementation:
Operation Result:
5.8.3 Confirm actione keyword
Press F5 to see a description of the Confirm action keyword, such as
Confirm Action []
For warning Popup Confirmation action, by default, this keyword selects the dialog box for the "OK" option.
Project Examples:
Code implementation:
Operation Result:
5.8.4 Choose Cancel on Next confirmation keyword
Press F5 to see a description of the Choose Cancel on Next confirmation keyword, as
Choose Cancel on Next confirmation []
Used for confirm action warning box point cancel operation.
Note: Choose OK on Next confirmation keyword is used for warning box Point OK operation, confirm action by default is a click OK.
Project Examples:
Code implementation:
Operation Result:
5.8.5 input text into prompt text prompt box enter keywords
Press F5 to see a description of the Choose Cancel on Next confirmation keyword, as
Input text into Prompt [text]
The input for the alert popup text input box, with the Confirm Action warning box for the entire text popup.
Project Examples:
Code implementation:
Operation Result:
Robot Framework Popup window handling keyword combat