I am trying to verify the text \"The information provided is either invalid or incomplete.\" is displayed using Selenium/WebDriver in Java.
I have the following HTML
Tried the same, works for me.
Created sample html file :
My name is Donald
I live in Ducksburg
Reused Nilesh's code
String script = "return window.getComputedStyle(document.querySelector('p#b'), ':after').getPropertyValue('content')";
JavascriptExecutor js = (JavascriptExecutor) UIKeyWords.getUIDriver();
String contentValue = (String) js.executeScript(script);
System.out.println(contentValue);