I have following button to locate. It is an ant controller.
<li class="ant-picker-ok"><button type="button" class="ant-btn ant-btn-primary ant-btn-sm"><span>Ok</span></button></li>
this is located in data entry form and its XPath change depend upon the selections that we made in top part of the form. So XPath cannot use. then i tried CSS selector and it also not support.
Finally I used class name as location strategy and use move to element.
@FindBy(className = "ant-picker-ok")
public WebElement shiftEndOkBtn;
code successfully execute upto below line.
new Actions(driver).moveToElement(shiftEndOkBtn).perform();
clicking part us not working and throws element is not visible. But element is visible
shiftEndOkBtn.click();
This is a ant time picker(https://ant.design/components/time-picker/)Any idea to solve this issue?