If you inspect the element which has the focus.
This is possible with all common browsers via development tools or use the SeleniumIDE Plugin for Firefox to get information about that page and build locators.
Often framework are used (like bootstrap) to ensure a consistent layout so a CSS-locator might look like:
var popupBody = driver.FindElement(By.CssSelector("div.modal-dialog div.content div.body")
Note that in this case Bootstrap would not the call the class 'popup' but 'modal-dialog'. The locator might furthermore vary depending on the inner structure. As mentioned inspect the element (or share the HTML code so we can suggest concrete locator).
By this you get a normal WebElement ala Selenium where you can get the Text
// use the element
.. popupBody.Text ..
Asked in February 2016Viewed 2,182 timesVoted 5Answered 1 times