18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
_prompt and _confirm not working
_prompt(message) and _confirm(message) described http://sahi.co.in/w/browser-action-apis
are not event parsed.
So we get a --FAILURE--
So I tried to add them to scheduler_functions.txt.
But then, it was impossible to navigateTo.
Is there a patch to get _prompt(message) and _confirm(message) working properly ?
are not event parsed.
So we get a --FAILURE--
So I tried to add them to scheduler_functions.txt.
But then, it was impossible to navigateTo.
Is there a patch to get _prompt(message) and _confirm(message) working properly ?
This discussion has been closed.
Comments
You are right, _prompt and _confirm are not exposed as APIs by Sahi right now.
Please have a look at this http://sahi.co.in/forums/viewtopic.php?id=2038 to see how _prompt can be used.
_confirm is similar.
Regards,
Narayan
It works !
I gave a little enhancement, allowing to custumize the message
Thank you for your support
In fact, for some reasons, it looks like not to be quite similar.
The following code does not work What am I doing wrong ?
_confirm function was not defined on Sahi. Use the code below:
Note that I am using getConfirmResult instead of confirm. If not, any javascript code calling confirm() will invoke this function, instead of Sahi's mock confirm function.
Regards,
Narayan
Thanks