0

Exception: ERROR: Element xpath=//*[@id='seriesNwsHldr']/div[2]/p[1]/a not found.

I checked in Fierbug. The path is correct but I don't know what's the reason for this test case to fail.

rid
  • 61,078
  • 31
  • 152
  • 193
  • Which browser you are using for Selenium? – Shubham Apr 09 '12 at 04:41
  • Could it be a timing problem? If an element on the page is generated or altered by javascript at page load time. There can be a race condition where selenium executes it's selector before your JS code can finish. You can do a wait_for_ before the click if that's the case. – William Apr 09 '12 at 08:18

2 Answers2

0

It looks like a problem of timing. May be you can intentionally add wait time till the element appears on the page.

Another possibility is that element which you are trying to interact is hidden.

Would be great if you can post errors you are getting when you test fails.

Manpreet Singh
  • 3,643
  • 2
  • 18
  • 14
0

Can I have the site for checking?

BTW sometimes you should to wait the loading of the page, so you need to do before of this action an instructions like:

clickAndWait(30000)

in my cases it solves a lotof problems :)

fdicarlo
  • 450
  • 1
  • 5
  • 10