Forum Discussion
8 Replies
- AlexKarasChampion Level 3
Hi,
Hm-m-m... Anything that prevents you from providing proper credentials into the dialog?
Have you tried to record your actions with TestComplete and check the result of the recording?
- shankar_rCommunity Hero
What happens when try to use aqFile.OpenTextFile(<filePath>,11,20)?
- bommareddyContributor
Hi Shankar,
When i tried to open using syntax OpenTextFile(<filePath>,11,20), I am getting error as "Unable to open the file."
Regards,
BommaReddy
- shankar_rCommunity Hero
That is expected result.
Where your file located,
Is it network drive? If it is network drive then you can do some stuffs available https://www.codeproject.com/Questions/265459/HOW-TO-ACCESS-A-SHARED-FOLDER-VIA-COMMAND-LINE
Or Folder locked with some other folder locker tool? You have find out whether that locker tool have any command line options to unlock your folder.
- bommareddyContributorYes. The file is located in FTP(File transfer protocol).
So how can I establish a connection from script to read and write in a text file which is located in FTP?
Regards,
BommaReddy- HKosovaSmartBear Alumni (Retired)
bommareddy wrote:
The file is located in FTP(File transfer protocol).
So how can I establish a connection from script to read and write in a text file which is located in FTP?You'll need to download the file from FTP to the local computer, then read/write the file (e.g. using the aqFile object), then upload the file back to FTP.
There are several ways to work with FTP:
- Some customers use the free WinSCP tool. It has a command-line interface), a COM object, and a .NET assembly (can be called via CLR Bridge).
- Windows also has the built-in ftp command-line tool. Check the example here: https://tinyapps.org/docs/ftp.html
- .NET class System.Net.FtpWebRequest can be used via CLR Bridge.
- COM object ChilkatFTP (free). Check the example here: http://www.robvanderwoude.com/vbstech_internet_ftp.php
Hope this helps!
- Some customers use the free WinSCP tool. It has a command-line interface), a COM object, and a .NET assembly (can be called via CLR Bridge).
- AlexKarasChampion Level 3
Hi,
> The file is located in FTP
This thread might help: https://community.smartbear.com/t5/TestComplete-General-Discussions/Uploading-file-to-an-FTP-server/td-p/81996
- shankar_rCommunity Hero
I have not worked with those stuffs but i guess you can use below line to connect the network drive
net use "\\NETWORKPATH\DRIVENAME" /user:"ROUTERNAME" "PW"
But I'm not sure how it is going to help you :(
Related Content
- 7 years agoAdagio
- 4 years agojshao
- 3 years agoUConnAnnMarie
Recent Discussions
- 9 hours agojstaehlin
- 2 days agoAivanitskiy