Copy and save image on web to local drive

Hi Everyone.

I have made process to capture pictures on web and then save it into local drive.

The procedure is : I search one by one model on the web , then take screenshot and save it into local drive.

The link to search model and then copy picture :
https://www.dienmayxanh.com/

But how to save into local drive with name same each I enter model name to search.

I have make process as attached but run not correct.

Thanks in advance!PIC from WEB.zip (4.2 KB)

2 Likes

Buddy @trunghai

Once you get the model name to search, assign it to a variable named in_model_name of type string…using a assign activity buddy, then

  1. while you save the image put like this buddy with save image activity
    “C:\Users\Administrator\Desktop\PC from WEB\”+in_model_name.ToString+“.png”

So this would save the image with the model name that you are searching…

Thats all buddy you are done
Kindly try this and let know buddy
Cheers @trunghai

Hi @Palaniyappan

Thanks you very much.

With another issue… I want to capture some images as some models in CSV file, but I do not know how to change selector.

Pls check some picture above and in attached file for my XAML file.
PIC from WEB.zip (48.8 KB)

Buddy @trunghai

add a open browser in ELSE part of if condition and place all the activities within it and change the dynamic attributes of the selector with wildcard buddy *
or
here you go with a xaml
PIC from WEB (2).zip (49.1 KB)

hope its resolved kindly try and let know buddy
Cheers

Hi @Palaniyappan

Thanks you.

But I think it still has problem with selector. It captured another pictures which I do not as want as below picture.

I want to capture blue picture, not red.
PIC from WEB.zip (103.3 KB)

Buddy @trunghai
fine add a assign activity before take screenshot


and pass that as variable to the selector of take screeshot activity like this buddy
image

Cheers

Hi @Palaniyappan

Pls kindly check as below

Thanks you!

Buddy @trunghai
you were almost correct…
just add double quotes before + on either side like this
title = ’ * " + value + " * ’

Cheers

Sorry,

I have re-check and edit but still same.

Could you pls edit in my xaml file ?Copy Image on web.xaml (26.0 KB)

buddy can i have that url of the webpage so tat i can send you the xaml with solution
Cheers @trunghai

https://www.dienmayxanh.com/tag/nr-bc369qkv2

pls check.

After input model name and search… it will go to this page, and then I capture picture on that.

1 Like

Buddy finally it worked buddy @trunghai
Its resolved
PIC from WEB.zip (13.3 KB)

Kindly try with this xaml and let know buddy, i have used chrome as browser , you can change to your browser type in open browser activity buddy
Cher @trunghai

1 Like

Hi @Palaniyappan

Sorry for late reply.

Thanks you so much for your strong support.

The XAML file is 90% correct ^^…. But it has a problem because it open many browser if I have many model to search.

I want to open Browser before run process… it only execute on one browser not open more.

I have edit your xaml file by delete Open Browser but the program can not run.

How to do fix this ?

Buddy @trunghai
Use close browser activity at last in the container of open browser buddy…
Cheers @trunghai
Kindly try this and let know buddy

Hi @Palaniyappan

Thanks you so much BroCopy Image on web.xaml (35.2 KB)
… I have completed my process as attached file ^^.

1 Like

Fantastic…buddy
Cheers @trunghai

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.