What is the problem with the Alert function in the Selenium IDE

0 votes

How do I verify or assert an alert command with a message that contains a variable in the form of text?

For example, I have to capture an alert command with this particular message: Answer number (var id_answer) successfully accepted. id_answer is the variable and I don't know if this value should be present before the alert command is written. This alert is triggered for a flash command in a controller, for example (in Rails). And I need to simulate the click the button "ok" inside an alert window with a selenium command too. Is it possible?

Can anyone help me with this by providing an example with the complete syntax command in Selenium IDE?

Mar 5, 2019 in Selenium by Vaishnavi
• 1,180 points
2,630 views

1 answer to this question.

0 votes

To simulate the button OK and click it, you could use command assertAlert: helps in getting an alert has the same effect as manually clicking OK. You could also use a getAlert function: It helps in retrieving the message of a JavaScript alert generated during the previous action, or else it fails if there are no alerts.

answered Mar 5, 2019 by Surya
• 970 points

Related Questions In Selenium

0 votes
1 answer
0 votes
2 answers

What is the role of TestNG & JUnit frameworks in Selenium?

TestNG and JUnit are test frameworks . it ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
2,783 views
0 votes
2 answers

what is the need of xpath when you have attributes like id ,class,name in selenium?

some of the controls not have id ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
1,742 views
0 votes
1 answer

There is an problem with the Recursion in Java. Method is returning empty list

checkMonth(driver) Ignore the List returned by that call. Perhaps you want ...READ MORE

answered Jun 6, 2018 in Selenium by jonss
1,014 views
0 votes
2 answers
0 votes
1 answer
0 votes
2 answers
+1 vote
2 answers

What is the difference between findElement and findElements in Selenium Webdriver?

FindElement Command -This method locates for the ...READ MORE

answered Feb 11, 2020 in Selenium by anonymous
8,308 views
0 votes
1 answer

How to automate the Instagram search bar with selenium

Hi, please don't search by any placeholder ...READ MORE

answered Mar 9, 2019 in Selenium by Surya
• 970 points
6,014 views
0 votes
1 answer

How to check if an image is displayed on web page while working with Selenium WebDriver?

I've come across a similar situation before, where the image ...READ MORE

answered May 10, 2019 in Selenium by Surya
• 970 points
7,830 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP