I have a csv file of input field names and I need to say if this name is found in the file then do this or that...
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> If Collateral_Valuation_Method_Short = "2" Then
hold = HTMLEditBox("Collateral Value_EB".Text
If hold <> Collateral_Value Then: HTMLEditBox("Collateral Value_EB".SetText Collateral_Value
''''add checking to see if 'Collateral Value is in the read only file'
End If</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">So instead of saying set the text or it should be read only I will see if the field name is in a list of read only fields.
In short, how can I say is this text found in this file.
Write a function that:
1) Opens the CSV file,
2) reads the lines from the CSV file in one at a time,
3) Parses the line by the separation character, and looks in the section that should contain your value,
4) Do compare,
5) Returns true or false.
There are example on this forum that show code for reading text from a file. Do a search for "open" and/or "input #" for code examples.
Current AUT running test scripts on TP 6.3 build 183, SQL 2000 DB.
Legacy AUT running on TP 5.6.0 Build 81 and TP 6.2 build 449 with SQL 2000 DB.
TP/IE Clients on VMWare ESX 4.1 server, AUT Servers on VMWare ESX 3.5 server.
Application Under Test (AUT):
Client/Server based, IE 7/8 interface with SQL 2005/2008 DB.