Selenium IDE Click button error while clicking on Play Recording

+1 vote

I'm using Selenium IDE and whenever I'm trying to play the recording, the value in the username and password field were getting removed upon clicking the login button.

Below is my HTML:

<tr>

  <td>open</td>

  <td>/en/login</td>

  <td></td>

</tr>

<tr>

  <td>type</td>

  <td>id=formHorizontalEmail</td>

  <td>uname</td>

</tr>

<tr>

  <td>type</td>

  <td>id=formHorizontalPassword</td>

  <td>passwd</td>

</tr>

<tr>

  <td>clickAndWait</td>

  <td>css=button.btn.btn-axa</td>

  <td></td>

</tr>
Jun 27, 2018 in Selenium by Martin
• 4,320 points
2,435 views

2 answers to this question.

+1 vote

Your code looks OK and would work fine on a "normal" website. Here, probably some Javascript on the website does not get triggered correctly and it erases the values. => Try using sendkeys instead of type.

answered Jun 27, 2018 by Samarpit
• 5,910 points
+1 vote

Hello,

There are a number of reasons that this could be failing. I will list a couple of them and steps to troubleshoot, but ultimately the problem here is that the IDE with no additional user interaction is not really the intended way for Selenium to be used. It's a nice to have to help you learn and create simple "hello world" style automation. To really use Selenium to its potential, you will need to have some understanding of HTML and CSS as well as be able to modify, extend or replace the selectors and generated IDE cod

  • There are multiple elements which match the element selector that you are using.
  • If alternative selectors are working, this is a likely reason. Often pages will have multiple similar elements, many of which may be hidden and/or disabled that match a selector that the IDE generates. Search the source to see if there are multiple elements that match, if so, use some alternative identifier. XPath and CSS selector will work here since you can give a "path" to your element including parent and ancestor which will make it unique. The default that the IDE comes up with may or may not include enough information to make it unique. You may need to construct an XPATH or CSS selector by hand that will work. For xpath, there are lots of examples online and tools to help you construct or test your xpath queries.The element you are attempting to interact with is inside of an iframe. This requires additional code to switch to the correct frame before interacting with the element.
  • Look up how to work with iframes using selenium IDE.
answered Nov 30, 2019 by surbhi
• 260 points
1 flag

Related Questions In Selenium

0 votes
0 answers
0 votes
2 answers

Python & Selenium: How to find and click on YouTube's Like button

Hello Nitin, as the Like button on ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
5,510 views
0 votes
1 answer

Cannot click on a button using selenium

The error that I figured out was ...READ MORE

answered Jan 4, 2019 in Selenium by Dushyant
3,715 views
0 votes
2 answers

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,500 points
13,773 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,188 views
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,910 points
7,263 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

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

Click on a button within a pop-up window with python selenium

It's not an Alert but a Modal Dialog Box. You ...READ MORE

answered Jun 20, 2018 in Selenium by Samarpit
• 5,910 points
31,672 views
+1 vote
1 answer

Angular JS: Selenium cannot click a button by python code on mac

You can try clicking it with javascript ...READ MORE

answered Aug 9, 2018 in Selenium by Samarpit
• 5,910 points
5,372 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