Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Browser/keywords/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,15 +883,15 @@ def wait_for_alert(
Example with returning text:

| ${promise} = `Promise To` `Wait For Alert` action=accept
| `Click` id=alerts
| `Click` id=alerts
| ${text} = `Wait For` ${promise}
| Should Be Equal ${text} Am an alert

Example with text verify:

| ${promise} = Promise To Wait For Alert action=accept text=Am an alert
| Click id=alerts
| ${text} = Wait For ${promise}
| ${promise} = `Promise To` `Wait For Alert` action=accept text=Am an alert
| `Click` id=alerts
| ${text} = `Wait For` ${promise}

[https://forum.robotframework.org/t//4343|Comment >>]
"""
Expand Down Expand Up @@ -933,24 +933,24 @@ def wait_for_alerts(

Example to handle two alerts, first one is accepted and second one is dismissed:

| ${promise} = Promise To
| ... Wait For Alerts
| ${promise} = `Promise To`
| ... `Wait For Alerts`
| ... ["accept", "dismiss"]
| ... [None, None]
| ... [None, None]
| Click id=alerts
| ${texts} = Wait For ${promise}
| `Click` id=alerts
| ${texts} = `Wait For` ${promise}

Example to handle confirm and prompt alert. Example assumes that the first is a
confirm and second one is prompt:

| ${promise} = Promise To
| ... Wait For Alerts
| ${promise} = `Promise To`
| ... `Wait For Alerts`
| ... ["dismiss", "accept"]
| ... [None, "I am a prompt"]
| ... ["First alert accepted?", None]
| Click id=confirmAndPrompt
| ${texts} = Wait For ${promise}
| `Click` id=confirmAndPromt
| ${texts} = `Wait For` ${promise}

[https://forum.robotframework.org/t/7887|Comment >>]
"""
Expand Down