Why this script is not fetching the data’s from .CSV file which is in controller machine one by one?. Please reply by modifying this code correctly. I am using EggPlant in Windows 98.
What am I doing wrong?
Masterscript
params dates
Click “Edit”
Wait “5”
Click “FindNext”
Wait “3”
TypeText DeleteKey
Wait “2”
TypeText dates
Wait “2”
Click “FindNext1”
Wait “3”
Click “NextFind”
Wait “2”
TypeText DeleteKey
Subscript
(* takes a csv file from controller machine and passes each value into *)
put file “C:\Documents and Settings\311218\Desktop\datefield.csv” into datefield (This satement worked fine in EggPlant which is for Mac)
repeat with each dates in datefield
masterscript dates
end repeat
[quote=“Ravichandran”]Why this script is not fetching the data’s from .CSV file which is in controller machine one by one?. Please reply by modifying this code correctly. I am using EggPlant in Windows 98.[/quote]If eggPlant is running okay for you on Windows 98, that’s great, but it’s currently only supported on Windows XP – but the problem here is in your code. I believe the problem is that you haven’t actually specified a delimiter for your dates – eggPlant is getting a big blob of characters from the file and doesn’t know where to split out the dates. If each line of the file represents a date, then you would want to modify the code like so:
put file "C:\Documents and Settings\311218\Desktop\datefield.csv" into datefield (*This satement worked fine in EggPlant which is for Mac*)
repeat with dates = each line of datefield
masterscript dates
end repeat
If it still doesn’t seem like the lines are being split correctly, you may need to add the following line to the beginning of the script:
set the defaultLineDelimiter to empty
Sorry, we are using EggPlant on Windows XP. Thanks for the code change. I will check how it works and come back to you
Hi EggPlantMatt,
I used the same script. But, it’s not fetching the value from the .CSV file.
it displays just…
typetext
But, it’s fetching the value from .CSV when I use the below script
put file “C:\Documents and Settings\Administrator\Desktop\datefield.csv” into datefield
repeat with each line in datefield
put “info” && IT
end repeat
Result:
it fetches the value with quotes which I don’t need.
But, really, it would be great if you fix my first script to perform parametrization. Because, I like to do the parametrization logic using PARAMS for all fields by keeping MASTERSCRIPT, SUBSCRIPT …Please let me know why it’s not fetching the value from .CSV file
Please send your csv file to the TestPlant support address along with the output that your current script is giving you (the one that’s outputting quotes.) eggPlant doesn’t add quotes to anything, so it’s not clear what is happening without being able to see the actual input.