AKarandjeff
12 years agoContributor
Log object variables
Is there a way to display the value of an object variable in the log? I have to determine what kind of object I'm trying to test against based input from a properties table. I have a situation where it appears that TC is not finding the object, but I'd like to display what object type it thinks it's looking for. When I do a Log.Message(textField), I get nothing but a blank message line in the log. Below is a snippet of my code. I want to see what's been put in the textField variable once the switch command has executed. Thanks.
switch (vfpFPObjType)
{
case "PropCombo":
textField = panelC.PropTypeComboBox.TextField;
break;
case "TableCombo":
textField = panelC.TableComboBox.TextField;
break;
case "PropText":
textField = panelC.PropTypeTextField;
break;
case "SimpleString":
textField = panelC.TextField;
break;
case "Password":
textField = panelC.SwingObject("JPasswordField", "", 0)
break;
default:
Log.Message("Type Not Found");
}
Log.Message(textField);