Popup messages using Selenium Web Driver

0 votes
I'm testing a website with validation etc. when the user types something incorrectly in each field and clicks save, a popup with the information appears.

I want to show a pop-up message when the user types something incorrectly in each field and clicks save. All that information is in the functions in the code (there is no JSON) file with them. How can I test them using selenium?
Jul 18, 2018 in Selenium by Martin
• 4,330 points
117 views

1 answer to this question.

0 votes

Try to get text From Pop Up:

String popUpText = driver.switchTo().alert().getText();

 And then Accept Pop up Message:

driver.switchTo().alert().accept();
answered Jul 18, 2018 by Samarpit
• 5,890 points

Related Questions In Selenium

0 votes
1 answer

Selenium 2.0 web driver Tutorials using .NET

Docs here have an example in C#: http://seleniumhq.org/docs/03_webdriver.html using ...READ MORE

answered Apr 20, 2018 in Selenium by Vardy
• 2,360 points
50 views
0 votes
1 answer

To check that the web page is loaded or not using Selenium Web Driver?

The solution is using Implicit Wait which ...READ MORE

answered May 24, 2018 in Selenium by Meci Matt
• 9,460 points
12,939 views
0 votes
2 answers

Get text using selenium web driver in python

text = driver.find_element_by_class_name("current-text").getText(); ...READ MORE

answered Feb 4, 2019 in Selenium by anonymous
27,312 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
3,090 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,346 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,890 points
2,491 views
0 votes
2 answers

Python: Using an existing google chrome profile with selenium chrome web driver

The problem is with the string "C:\Users\Eric\Desktop\beeline.txt" Here, \U starts an ...READ MORE

answered May 23, 2019 in Selenium by shinio llahsra
6,613 views
0 votes
3 answers

How to click the search button using Selenium web driver and Python

You can try with tag. #this code will ...READ MORE

answered Apr 10, 2019 in Selenium by Matin
8,928 views