Share on Facebook0Share on LinkedIn0Share on Google+0Tweet about this on Twitter0Email this to someoneDigg this

public void checkElementUsingXPath(String element, String message) throws IOException {
try {
} catch (AssertionError e) {
message = message.contains("is displayed") ? message.replace("is displayed",
"is not displayed") : message.contains("is disabled") ? message.replace("is disabled",
"is not disabled") : message.contains("is enabled") ? message.replace("is enabled",
"is not enabled") : message.contains("is not enabled") ? message.replace("is not enabled",
"is enabled") : message.contains("is generated") ? message.replace("is generated",
"is not generated") : message.contains("is selected") ? message.replace("is selected",
"is not selected") : message.contains("is identified") ? message.replace("is identified",
"is not identified") : message.contains("is added") ? message.replace("is added",
"is not added") : message.contains("is successfully") ? message.replace("is successfully",
"is not successfully") : message.contains("is highlighted") ? message.replace("is highlighted",
"is not highlighted") : message.contains("is being Processed") ? message.replace("is being Processed",
"has Failed") : message;

Leave a Reply

Your email address will not be published. Required fields are marked *