0

Could you please share if we can create a pop alert saying Activity Begins and once the execution of specific scripts ends another pop alert saying Activity Completed.

I tried Windows.alert which does not work. Also I have gone through most of the post all are related to handling of pop-ups not related to creation.

0

1 Answer 1

2

Just try the below one, which gives popup with "HI.." message (example in Java):

JavascriptExecutor jse=(JavascriptExecutor)driver;
jse.executeScript("window.confirm('HI..');");

Only thing is you need to use JavascriptExecutor to execute javascript which creates an alert popup. Make sure you need to handle this also in automation if required.

Sign up to request clarification or add additional context in comments.

3 Comments

Hi Murali, it is getting errored out with nullpointer exception.. :(
@vinay, please paste your code and exception so that we can able to help.. I tried answer which I provided and its working fine for me.
Murali,Sorry it is working as expected i messed up with the syntax...thanks :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.