I need to verfiy the dialog box displayed on clicking a 'Save' button for below conditions.
- Whether the dialog box is displayed?
- Text present in the dialog box?
I have tried using all locators and finally using css selector as below.
driver.findElement(By.cssSelector("#AdminMainContent_AlertBoxMER1_lbtnOK > span")).isDisplayed()
//to verfiy whether dilaog box is displayed
and i got exception as below
org.openqa.selenium.StaleElementReferenceException: Element is no longer valid (WARNING: The server did not provide any stacktrace information)