I am working on a Java project and I need to use jQuery (it is my task). Now I need to handle an alert and verify that the message I need is displayed. I dug up a bunch of information, but all of it is about creating alerts and etc.
Could someone explain it to me how it works and how I need to use it? Maybe it is impossible? I am using jQuery in my task.
At this time I have this code and I need to add functionality described above.
public void getCoordinates() {
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("var position = $('.flash').position();" +
"$('#top').val(Math.round(position.top));" +
"$('#left').val(Math.round(position.left));" +
"$('#process').click();");
}