I have a sample program as follows
public static void enterText(WebElement loc, String value) {
try {
loc.clear();
System.out.println("Text cleared successfully");
} catch (Exception e) {
// exception handling
}
}
On executing loc.clear()
, a runtime exception occurs.
Is there a way I can get the method name with parameters after exception happens.
I need to get this enterText(WebElement loc, String value)
.