Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant't download in nobrowser mode - use normal browser interaction to download #808

Closed
gorcer opened this issue May 27, 2020 · 12 comments
Closed
Labels

Comments

@gorcer
Copy link

gorcer commented May 27, 2020

Hi,

I try to download file in nobrowser mode.

  1. First try

My script have a one line:

https://doghouse.ru/pricelist/100sp_full.csv

Result:
There is no file in the directory

  1. Second try:

My script:

download https://doghouse.ru/pricelist/100sp_full.csv to 100sp.csv

wait 5

Result:
File exists, but it size is zero!

To run script i'm use command on my Ubuntu machine:

tagui test.tag -n

Help please.

@siowyisheng
Copy link
Contributor

ERROR - for headless and visible Chrome, download file using normal webpage interaction

You should get the error above. Currently, you will need to download the file through normal webpage interaction (clicking).

@siowyisheng siowyisheng changed the title Cant't download in nobrowser moded Cant't download in nobrowser mode - use normal browser interaction to download May 27, 2020
@gorcer
Copy link
Author

gorcer commented May 27, 2020

I'm use normal browser interaction, see - first try

It's work in normal mode, but in nobrowser mode it's doesnt work.
File doesn't download.

@siowyisheng
Copy link
Contributor

For normal browser interaction, you would need a link to click on to download the file. Visiting the URL won't work.

@gorcer
Copy link
Author

gorcer commented May 27, 2020

Ok, i create simple page with DOWNLOAD link https://doghouse.ru/test

My script:

https://doghouse.ru/test
click DOWNLOAD
wait 10

My command:

tagui test.tag -n

START - automation started - Wed May 27 2020 14:01:16 GMT+1000 (+10)
https://doghouse.ru/test - 

click DOWNLOAD
wait 10

https://doghouse.ru/test - 
FINISH - automation finished - 10.5s

My result - there is now file in the directory,

P.S.: it's work with normal mode ( tagui test.tag -h)

@gorcer
Copy link
Author

gorcer commented May 27, 2020

Rocket - it's cool)
What should I do?

@siowyisheng
Copy link
Contributor

2020-05-27-15-16-37

@gorcer
Copy link
Author

gorcer commented May 28, 2020

What's about problem? You solve it?

@siowyisheng
Copy link
Contributor

siowyisheng commented May 28, 2020

Oh I thought it was solved already.

chrome_step('Page.setDownloadBehavior',{behavior: 'allow', downloadPath: 'c:\\Users\\userid\\Downloads'});
Try this before clicking download. I think this is the same issue as #477

@gorcer
Copy link
Author

gorcer commented May 28, 2020

It's doesn't work. It's freeze on start:

gorcer@www2:~/tagui/doghouse$ tagui test.tag -n

START - automation started - Thu May 28 2020 17:08:49 GMT+1000 (+10)

My script:

chrome_step('Page.setDownloadBehavior',{behavior: 'allow', downloadPath: '/home/gorcer/tagui/doghouse/'});

https://doghouse.ru/test
click DOWNLOAD
wait 5

NOBROWSER mode

Tested on Ubuntu16 Server and Debian8 Server

@siowyisheng
Copy link
Contributor

tested

https://doghouse.ru/test
click DOWNLOAD

run with tagui my_flow.tag -h

-h headless is to not show a browser.
-n nobrowser cannot download the file.

@gorcer
Copy link
Author

gorcer commented May 28, 2020

Okay (((

Headless mode does't work on some my servers and if it's work it take to 3x system resource more.

@kensoh
Copy link
Member

kensoh commented Nov 23, 2020

Hi Egor, sorry I was away the past few months - tebelorg/RPA-Python#144

I see.. Yes -headless mode runs Chrome using invisible mode, and Chrome takes up a lot of memory. However, it is better for automation because it is more accurate than the -nobrowser mode. That mode uses PhantomJS web browser which is an old browser and more likely to encounter issues during automation with modern websites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants