I have a web page, where I need to click on a particular element, but the element will be visible only after scroll down in the page. Also the mouse need to be pointed on the left side of the page in order to make the scroll action. The pages are shown below.
now i need to take the cursor to the left side (the black colour area) inorder to scroll down and get the label manage emplyee as showed below.
I have used scroll to element but that didnt work throwing error as Unable to click on object ‘Object Repository/Page_App4Office - root/span_Manage Employee’ (Root cause: org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point
i tried wait for element visible/clickable but that didnt work.
I tried this option but no luck. The pointer goes to that element on left side but the scroll still not working. I tried some simple java scripts like scroll to view e.g WebUI.executeJavaScript(‘document.getElementById(‘manageEmployeePageId’).scrollIntoView()’, null), but nothing worked. Unfortunately i am unable to understand the solution provided by @Russ_Thomas, is there any simple way?
If you are not familiar with the CSS selector and want to use xpath instead, then modify it to this: WebElement elem = driver.findElement(By.xpath(selector))
To test these functions, create a custom keyword and put these functions into them, then you can call them in your test case.