Sub Test2
Dim moneyhoney
dim efile
dim s(2)
dim p
dim q
set efile = DDT.ExcelDriver("C:\Documents and Settings\nsharma\My Documents\Test Complete\test1.xls","Sheet3")
While Not efile.EOF()
s(0)=efile.Value("Script")
s(1)=efile.Value("Price")
s(2)=efile.Value("Qty")
Set form1 = Aliases.moneyhoney.Form1
Call form1.comboBox1.ClickItem("Buy")
Set textBox = form1.textBox1
Call textBox.Click(51, 11)
textBox.wText = s(0)
Set textBox = form1.textBox3
Call textBox.Click(52, 9)
textBox.wText = s(1)
Set textBox = form1.textBox2
Call textBox.Click(33, 8)
textBox.wText = s(2)
Call form1.textBox4.Click(42, 9)
form1.button1.ClickButton
Call form1.StripMainMenu.Click("Held|Holdings")
set holding=Aliases.moneyhoney.holding
'Call form1.holding.dataGridView1.ClickCell(1, "qty")
row=holding.dataGridView1.RowCount-2
col=holding.dataGridView1.ColumnCount-2
temp= CStr(holding.dataGridView1.wValue(row,1))
if StrComp(CStr(s(0)),temp,1) then
Log.Message("Pass"+temp)
Else
Log.Message("Fail"+temp)
end if
if s(1)= holding.dataGridView1.wValue(row,2) then
Log.Message("Pass"+CStr(holding.dataGridView1.wValue(row,2)))
Else
Log.Message("Fail"+CStr(holding.dataGridView1.wValue(row,2)))
end if
if s(2)= holding.dataGridView1.wValue(row,3) then
Log.Message("Pass"+CStr(holding.dataGridView1.wValue(row,3)))
Else
Log.Message("Fail"+CStr(holding.dataGridView1.wValue(row,3)))
end if
Call Aliases.moneyhoney.holding.Close(1000)
efile.Next
Wend
End Sub
Thursday, October 22, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
I welcome your comment, will respond and post it at the earliest:)