Setting Dialog Behavior

By default, Simplex will accept all dialogs.

If you’d instead like to dismiss dialogs (or have a combination of accepting and dismissing dialogs at different points in your automation), you can use Simplex’s set_dialog_settings function throughout your automation scripts.

Retrieving Dialog Content

You can retrieve the content of a dialog by calling Simplex’s get_dialog_content function any time after the dialog has handled.

External URL Dialogs

Confirmation dialogs (like the one below) for opening URLs in external applications aren’t managed by Simplex — our browser containers can’t open external applications.

Here’s an example of handling dialogs.

from simplex import Simplex

simplex = Simplex(api_key="your-api-key")

session_id, livestream_url = simplex.create_session(proxies=False)
simplex.goto("https://simplex.sh/dialog-example.html")
simplex.click("Pickup")

dialog_text = simplex.get_dialog_message()
print(dialog_text)

simplex.set_dialog_settings(False)

simplex.click("Pickup")

dialog_text = simplex.get_dialog_message()
print(dialog_text)

simplex.close_session()

You should see the following output in console: