Due to a client’s request we made our menu bar a floating object.
As I navigate through items in our form to process a job data change transaction against an employee occasionally objects are hidden behind the menu.
So when I execute the command:
WebUI.click(findTestObject('Page_New Action - Job Data Change/btn-search-supervisor'))
I get the following error:
Test Cases/Staff Position JDC FAILED because (of) Unable to click on object ‘Object Repository/Page_New Action - Job Data Change/btn-search-supervisor’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1056, 8). Other element would receive the click: Tools
A quick search of the forum didn’t drum up any way to automatically make every object I go to interact with move towards the middle of the page away from the Menu at the top of the screen.
Yeah the default operations detect that the object is in the ‘visible’ space of the webpage. But due to the floating menu it’s not clickable. At the moment I re-organized the test so that step is executed before it scrolls down.
I’ll take a look at those options though, because there are parts of our current test automation framework where we still needed this.
Did we every come up with another work around? I’m having a similar issue, but my issue is screenshots. I have a banner that hovers to show we are in a test environment. When I scroll to the object to interact with it or screenshot it, it’s hidden by the banner…
You should document what you mean by MENU_OFFSET (and any other externals this code relies upon).
Great care needs to be taken when presenting code as generic (e.g. “Ensures that an element is somewhere in the viewport”) when in fact it won’t work for anyone else.