title: Get Text of Success alert message in Ant Design and verify it using Selenium
body: <p>In one of my Projects, I have to verify the success alert text using Selenium. The UI is coded in react JS following Ant design. For verification please follow this link '<a href="https://ant.design/components/message/" rel="nofollow noreferrer">https://ant.design/components/message/</a>' and click on Display Normal message. The message is shown above at the top of the page but I am not able to get the text from that using Selenium Webdriver coding in Core Java. Please help.</p>
  
  <p>I tried this code:</p>
  
  <pre><code>driver.findElement(By.cssSelector(".ant-btn-primary")).click();
              WebDriverWait wait = new WebDriverWait(driver, 60);
              WebElement successmessage = wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("ant-message-custom-content-ant-message-success")));
              successmessage.getText();
  
  </code></pre>