First person to answer this (I don't believe there is an answer) gets a free dinner!
I am trying to locate the coordinates of a link (text) in a paragraph to move the mouse to that link to perform a hardware click (not a javascript click or click via selenium).
<p>for full automatic work you need to read about <code>DesiredCapabilities</code> as this: <a href="https://stackoverflow.com/questions/23510816/how-to-handle-downloading-a-file-in-selenium-webdriver">How to handle downloading a file in selenium webdriver?</a></p>
Doesn't matter really, the coordinates returned are always that of the enclosing <p>
Look here: https://sqa.stackexchange.com/questions/2197/how-to-download-a-file-using-seleniums-webdriver
To see the above code on page, look for the text How to handle downloading a file in selenium webdriver?
Inspect it, play around with it, no matter how I try to get at the anchor location, I can't seem to find a way to get to it. It's always the paragraph bounding rectangle.
Inspecting in Firefox it will highlight the text (but how to get to that programmatically?)
Seleniun 'finds' the anchor fine, i've tried by text, xpath, css, all find the same tag, inside the <p> and all return the x,y of the <p>.
I've tried a range to count words and calculate the position, but getting the text returns the text of the anchor, not the enclosing paragraph.
thanks in advance!