I am able to click on filter option on website,my question is " filter option was opened by using xpath and at a time filter option will be closed"
Code trials:
WebElement element= driver.findElement(By.xpath("//button[contains(@class,'slds-button slds-button--icon-border-filled action-control__button action-control--square')]"));
JavascriptExecutor executor = (JavascriptExecutor) driver;
executor.executeScript("arguments[0].click();", element);