Do not use xpath search .. its very erratic and does not help your business at all. Also, your selenium code is now closely linked to the markup, and any changes to the markup, such as introducing a container (like a div), will not pass the test.
you can use scope to achieve something like this. Example:
var container=driver.findElement(By.xpath("//*[@id='pa-u_14782488-bd']")); var spans=container.findElements(By.tagName("span")); spans[1].Click();
And I don’t understand how this works because you have a link, and since I guess you have two spaces in it for style purposes, but clicking on any of them should still trigger the same action as and click on the correction button? or am I missing something?
It is possible that firefox is not reporting your events correctly.
source share