I would like for Selenium to navigate a menu via arrow keys–Starting with clicking the top menu item then pressing “DOWN”, “DOWN”, …
The problem is that you have to always supply a specific element to send the “DOWN” to.
Is there any way to get the current element?
I tried:
by.xpath(".")
but it said that the expression was unrecognized or didn’t return a proper object.
I expect I’m jsut missing some stupid trick.
Don’t know of a more straightforward way than accessing
document.activeElementHow do I test which element has the focus in Selenium RC?