Forum Discussion
3 Replies
Sort By
- baxatobCommunity Hero
with open("trade.txt", "r") as file_: rows_array = file_.readlines() rows_count = len(rows_array)
- shankar_rCommunity Hero
TestComplete provides below option,
def Test(): fileName = "D:\\Files\\MyFile.txt" fileObj = aqFile.OpenTextFile(fileName, aqFile.faRead, aqFile.ctANSI) Log.Message(fileObj.LinesCount) fileObj.Close()
- AlexKarasChampion Level 3
Hi,
Count the number of new-lines in the text.
See the help for GetListLength() method.
Related Content
- 11 months agoRocket