Latest Questions tagged Alert

Browse all latest questions tagged Alert

73
Votes
Published 31 Aug, 2022
Java - Selenium automatically accepting alerts

Does anyone know how to disable this? Or how to get the text from alerts that have been automatically accepted? This code needs to work, driver.findElement(By.xpath("//button[text() = \"Edit\"]"))....

80
Votes
Published 17 Sep, 2022
Java - alert type none closing javafx

I have a program with a menu bar that have an 'About' button to display some info about the app. The thing is that when I use AlertType.INFORMATION I can hit Ok button to close the alert, but when i...

86
Votes
Published 05 Jul, 2022
Jquery - jQuery UI Alert Dialog as a replacement for alert()

I'm using alert() to output my validation errors back to the user as my design does not make provision for anything else, but I would rather use jQuery UI dialog as the alert dialog box for my message...

163
Votes
Published 16 Apr, 2022
Javascript - Bootstrap Alert Auto Close

My need is to call alert when I click on Add to Wishlist button and should disappear the alert in 2 secs. This is how I tried, but the alert is disappearing instantly as soon as it is appearing. Not s...

25
Votes
Published 16 Apr, 2022
Javascript - Javascript: Why sometimes alert() does not work but console.log() does?

From time to time, I face a very intriguing bug. My javascript code does not display an alert(msg) during execution, but if I use a console.log(msg) it does show up in the console. What could prevent...

35
Votes
Published 13 Sep, 2022
Java - JavaFX Alerts and their size

Recently, JavaFX introduced Alerts (Java 8u40). Consider the code example below. How can I display a full message that is longer than just a few words? My messages (contentText property) get cut at...

5
Votes
Published 08 May, 2022
Python - How to Click the "OK" Button within an Alert using Python + Selenium

I want to click the "OK" button in this pop up dialog I tried: driver.switchTo().alert().accept(); but it doesn't work

41
Votes
Published 26 Apr, 2022
Python - Check if any alert exists using selenium with python

I'm trying to write a test with selenium in python language for a web page that manages users. In this page someone can add role for users and if a role exists while adding it, an alert raises. I don'...

21
Votes
Published 10 Jun, 2022
Reactjs - How to use ALERTIFY JS in React?

I'm trying to use ALERTIFYJS in react but its alertify alerts are not working. Below is the code (window.alert is working fine on my browser) import alertify from 'alertifyjs'; clickHandle = () =>...

9
Votes
Published 16 Apr, 2022
Javascript - Why are new lines not working in this javascript alert window?

If your console log is showing \n rather than a new line, then it means the \ is escaped in the original string... Compare console.log(1,"\\n\\n"); console.log(2,"\n\n"); Solution use .replace()...

53
Votes
Published 22 Jul, 2022
Jquery - jquery alert plugin , jConfirm

I got this script which works perfect when i am not using jquery's alert plugin. But i need to use alert plugin and after learning from a tutorial i implemented it. But the script does not seem to wor...

92
Votes
Published 13 Jun, 2022
Jquery - Javascript confirm box, if cancel is clicked, it will not reload the page

Is there away that the confirm box appeared, if i clicked "ok" it will go to another page and if i clicked "cancel" it will just stay and the current page will not reload again? THANK YOU.

92
Votes
Published 08 Jun, 2022
Reactjs - The reason behind onClick={alert('hi')} being called at render

I understand that this is not the right way to make a button show an alert on click. I would like to understart the logic behind this. I understand that on click needs to get a reference to a functio...

45
Votes
Published 29 May, 2022
Reactjs - React; How to get the width of React-Alert adjust based on the alert text

I'n my react app, i'm using react-alert. The problem i'm having is the width seems to be fixed thus having the text wrap. I'm trying to have the width adjust it's length based on the length of the con...

39
Votes
Published 23 Aug, 2022
Java - How to show alert in a jsp from a servlet and then redirect to another jsp?

I tried this but does not display the message only redirects login.jsp <form method="post" action="Login_Servlet" > <input name="idUsuario" type="text"/> <input name="password" ty...