Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

First of all, wait for the element you'll be clicking. Right now you're waiting for a different element.

Here's how: http://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-presenthttps://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-present

Then, if you still get that error, the ID is probably wrong and thus not actually present on the page (in the same frame).

And why do you use XPath to locate by ID? Using findElementById is much cleaner.

First of all, wait for the element you'll be clicking. Right now you're waiting for a different element.

Here's how: http://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-present

Then, if you still get that error, the ID is probably wrong and thus not actually present on the page (in the same frame).

And why do you use XPath to locate by ID? Using findElementById is much cleaner.

First of all, wait for the element you'll be clicking. Right now you're waiting for a different element.

Here's how: https://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-present

Then, if you still get that error, the ID is probably wrong and thus not actually present on the page (in the same frame).

And why do you use XPath to locate by ID? Using findElementById is much cleaner.

Source Link
FDM
  • 5.9k
  • 1
  • 17
  • 34

First of all, wait for the element you'll be clicking. Right now you're waiting for a different element.

Here's how: http://stackoverflow.com/questions/20903231/selenium-wait-until-element-is-present

Then, if you still get that error, the ID is probably wrong and thus not actually present on the page (in the same frame).

And why do you use XPath to locate by ID? Using findElementById is much cleaner.