You should wait until, save button visible. After that only, you have to click save button.
Steps
1.Create Firefox browser session
2.Navigate to the page and do some operation [ Whatever you wants as per your requirements]
3.Wait until, save button visible
4.Then click save button.
public void buttonClick()
{
WebDriver driver = new FirefoxDriver();
waitForElementInDOM(driver, "globalquickcreate_save_button_NavBarGloablQuickCreate", 15);
WebElement saveButtonElement = driver.findElement(By.id("globalquickcreate_save_button_NavBarGloablQuickCreate"));
if(saveButtonElement.getText().equalsIgnoreCase("Save"))
{
saveButtonElement.click();
System.out.println("Save button clicked ! ! !");
}
else
{
System.out.println("Element not present");
}
}
-------------------------------------------------------------------------------------
public void waitForElementInDOM(WebDriver driver,String elementIdentifier, long
timeOutInSeconds)
{
WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds );
try
{
//this will wait for element to be visible for 15 seconds
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(elementIdentifier)));
}
catch(NoSuchElementException e)
{
e.printStackTrace();
}
}