#Region " Script Header
"
' Functional Test Script
' author Administrator
Imports Microsoft.VisualBasic
Imports Rational.Test.Ft
Imports Rational.Test.Ft.Object.Interfaces
Public Class read_and_write
Inherits read_and_writeHelper
'Script Name : read_and_write
'author Andreas Franke
Public Function TestMain(ByVal args() As Object)
StartApp("ClassicsJavaB")
' Frame: ClassicsCD
REM PlaceOrder().Click()
Dim strFilename As String = "c:\Button_Text"
Dim strExpected As String = "c:\Expected.txt"
Dim strProperty_text As String
Dim intFileNum As Integer
Dim strLine As String
intFileNum = FreeFile()
strProperty_text = PlaceOrder.GetProperty("Text")
MsgBox
(strProperty_text, MsgBoxStyle.Information, "The Text
on the Pushbutton is")
FileOpen(intFileNum, strFilename, OpenMode.Output)
Print(intFileNum, strProperty_text)
' The Value of the Pushbutton property text will be save in
'c:\Button_Text
FileClose(intFileNum)
FileOpen(intFileNum, strExpected, OpenMode.Input)
Input(intFileNum, strLine)
If strProperty_text = strLine Then
LogTestResult
("The Pushbutton Text is correct", True, "Expected
Text = Actual Text")
Else
LogTestResult
("The Pushbutton Text is incorrect!! Expected Text is
:
" + strLine, False, "but found the actual Text :
" + strProperty_text)
MsgBox
(strProperty_text, MsgBoxStyle.Critical, "The Curent
Text is not the expected Text")
End If
End Function
End Class
|