comparison between two strings
Hello
I use a file(PerdiocRequest) , which has been attached, inorder to make a string by this code:
var Driver = DDT.ExcelDriver("C:\\PeriodicRequest.xls", "Sheet1");
var m =Driver.Value(0);
m = aqConvert.VarToStr(m);
var k= Driver.Value(1);
k = aqConvert.VarToStr(k);
var z = Driver.Value(2);
z = aqConvert.VarToStr(z);
var y = Driver.Value(3);
y = aqConvert.VarToStr(y);
total =m+"-"+k+"-"+z+"-"+y;
Also, I have used an object, which has been captued and attaced as a jpg format, in the code it is called t1( AppType.frmGridDetails.tableLayoutPanel1.grpContent.tlpValues.lblValue3)
I compare total and t1 with each other. Althought they are the same, but the result is different.
Could anybody help me why is occued?
function Test1(AppType)
{
AppType.frmPeriodicRequest.tableLayoutPanel1.entityDataGridView1.dgvMain.Click(824, 41);
var Driver = DDT.ExcelDriver("C:\\PeriodicRequest.xls", "Sheet1");
var m =Driver.Value(0);
m = aqConvert.VarToStr(m);
var k= Driver.Value(1);
k = aqConvert.VarToStr(k);
var z = Driver.Value(2);
z = aqConvert.VarToStr(z);
var y = Driver.Value(3);
y = aqConvert.VarToStr(y);
total =m+"-"+k+"-"+z+"-"+y;
t1 = aqConvert.VarToStr(AppType.frmGridDetails.tableLayoutPanel1.grpContent.tlpValues.lblValue3.Text);
total = aqConvert.VarToStr(total);
if(t1 == total)
Log.Message("Equal");
else
Log.Message("Not Equal");
AppType.frmGridDetails.tableLayoutPanel1.btnOk.ClickButton();
DDT.CloseDriver(Driver.Name);
}
Image of t1(AppType.frmGridDetails.tableLayoutPanel1.grpContent.tlpValues.lblValue3)
Excel File: