I am having an issue with selenium, testing angular site.
I want to press the pub name field, in this screen:
As you can see this is a side menue that is opened,
and this is the Html:
I try to wait the element to be clickable, and it passed it. This is my code:
public static void insertPublisherName(String publisherName)
{
// BasePage.manuallyKeyboardPressing(Keys.ESCAPE);
// Logger.info("\n ******************* insert publisher name by Xpath: "+ COMPANY_NAME_XPATH +" *\n **************************************************\n");
// BasePage.inputValueByXpath(publisherName,COMPANY_NAME_XPATH);
WebDriver driver2 = WebDriverMgr.getDriver();
driver2.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
WebDriverWait wait = new WebDriverWait(driver2,58);
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[@formcontrolname='publisher_name']")));
WebElement element = driver2.findElement(By.xpath("//input[@formcontrolname='publisher_name']"));
element.click();
element.clear();
element.sendKeys("123465");
}
And this is the exception:
:ERROR: element click intercepted: Element <input _ngcontent-xni-c24="" autocomplete="off" formcontrolname="publisher_name" nz-input="" placeholder="Enter Publisher Name" class="ant-input ng-untouched ng-pristine ng-valid" ng-reflect-name="publisher_name"> is not clickable at point (1560, 116). Other element would receive the click: <div class="ng-tns-c0-94 ant-notification-notice-with-icon">...</div>
I tried also to made selenium press esc button and still this is the error, how can I overcome this issue?
How can I know where to click that element will be free to click where I need him to click This is not waiting issue since when I debug I WAIT more times and still get this error
Regards