Recent

Author Topic: [SOLVED] Help for downloand file  (Read 3439 times)

magleft

  • Full Member
  • ***
  • Posts: 125
Re: Help for downloand file
« Reply #15 on: June 02, 2023, 08:30:34 pm »
It works!!! Thanks so much for everyone's help.
windows 10 64

magleft

  • Full Member
  • ***
  • Posts: 125
Re: [SOLVED] Help for downloand file
« Reply #16 on: June 03, 2023, 11:32:31 am »
Jurassic Pork

One additional question. How could we set the folder and file name to be saved?
Αnd again I would like to thank you for your help.
« Last Edit: June 03, 2023, 12:03:32 pm by magleft »
windows 10 64

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1251
Re: [SOLVED] Help for downloand file
« Reply #17 on: June 04, 2023, 07:42:55 am »
Hello,
the file is downloaded in the download folder of the used webbrowser. Then you can move the file and rename it in another folder with the renameFile function. Example :
Code: Pascal  [Select][+][-]
  1. var
  2.   dat_old, dat_new: string;  
  3. begin
  4.   dat_old := 'C:\olddir\test.txt';
  5.   dat_new := 'C:\newdir\test.txt';
  6.  
  7.   if RenameFile(dat_old, dat_new) then begin
  8.     ShowMessage('Renaming was successful!');
  9.   end else begin
  10.     ShowMessage('Error!');
  11.   end;
  12. end;
Friendly, J.P
« Last Edit: June 04, 2023, 08:06:27 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

rvk

  • Hero Member
  • *****
  • Posts: 6585
Re: [SOLVED] Help for downloand file
« Reply #18 on: June 04, 2023, 12:24:10 pm »
Moving the file from downloads to the desired location feels like the easy way out ;)
(which isn't to say that's a bad thing  :) )

It should be possible to set the download location for the chromedriver via the ChromeOptions.

https://sites.google.com/a/chromium.org/chromedriver/capabilities

(Although I'm nog sure how this would be implemented in Webdriver4L.)


magleft

  • Full Member
  • ***
  • Posts: 125
Re: [SOLVED] Help for downloand file
« Reply #19 on: June 08, 2023, 05:02:48 pm »
Thanks !!!
windows 10 64

 

TinyPortal © 2005-2018