I need to get the default value from prompt via selenium. If this is my prompt :
prompt("Please enter your name:", "Harry Potter");
I want to get "Harry Potter" to my String
I tried use this :
alert.Text;
But i get the first text "Please enter your name:
"
The prompt :
var person = prompt("Please enter your name:", "Harry Potter");
my code :
String name = driver.switchTo().alert().getText();