From ccfe68761b33168e5593c30c748fca8be042e214 Mon Sep 17 00:00:00 2001 From: soulgalore Date: Wed, 14 Feb 2024 08:33:40 +0100 Subject: [PATCH] docs: alert box --- jsdoc/tutorials/04-Interact-with-the-page.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jsdoc/tutorials/04-Interact-with-the-page.md b/jsdoc/tutorials/04-Interact-with-the-page.md index 6b2fdd86a..9279afd8c 100644 --- a/jsdoc/tutorials/04-Interact-with-the-page.md +++ b/jsdoc/tutorials/04-Interact-with-the-page.md @@ -159,3 +159,10 @@ Using the [set commands](Set.html) you can set values to HTML elements. ## Select You can use the [select command](Select.html) for selecting an option in a drop-down field. + +## Alert boxes +If you need to click on an alert box, the best way is to use Selenium directly. Here's an example on how to accept an alert box. + +```javascript +await context.selenium.driver.switchTo().alert().accept(); +``` \ No newline at end of file