# How to validate that bootstrap validation popup message is being displayed with Selenium and browser console?

How do you locate a error message that appears as a tooltip in the browser console? It disappears before I can inspect it. I was thinking the firstname field's error message would be this, but selenium cannot find it.

 static By firstnameerror = By.cssSelector
("div.row-fluid.first-name-container>div.errorMessageBox");

WebDriverWait wait = new WebDriverWait (webdriver, 60);
wait.until(ExpectedConditions.elementToBeClickable(createacct));
WebElement create_acct = webdriver.findElement(createacct);
create_acct.click();

WebElement iframeSwitch = webdriver.findElement(
By.id("register-  iframe"));
webdriver.switchTo().frame(iframeSwitch);
wait.until(ExpectedConditions.elementToBeClickable(submit));
WebElement submitbtn = webdriver.findElement(submit);
submitbtn.click();

webdriver.findElement(firstname).getText();


• You can try using a hybrid tool, such as TestComplete or Ranorex, they will help you locate it; having said it, even you can locate this tooltip with a hybrid tool, it does not mean you can find it using Selenium in a console. – Yu Zhang Apr 5 '18 at 22:40
• Thanks. Are those free tools? – seleniumappiumnewbie Apr 5 '18 at 22:47
• No, but you can download trial versions – Yu Zhang Apr 5 '18 at 22:48

You can't get the text, but the required attribute defaults to the standard text "please fill out this field", so you can check the required attribute.
 WebElement first_name = webdriver.findElement(firstname);