Hi team,
i am working in browser where i want to dowloand an image by right clicking on it .
and also tried with the following code
${image_url}= Get Element Attribute //*[@id=“__photo3-inner”]/div/img src
** log to console ${image_url}**
** Run Process curl -o ${id}.jpg ${image_url}**
by this able to download
but unable to open the image.
raivo
May 19, 2023, 9:49am
2
Does Get Element Attribute
return valid url?
@raivo
Yeah it giving valid url only and i am getting image also but getting following error
raivo
May 19, 2023, 10:24am
4
If you manually open ling does it work? Can you share that link?
i can’t share that,
is there any activity to right click at any element in the browser ?
raivo
May 19, 2023, 10:36am
6
As in documentation >
with playwright :
Click locator button=right
With selenium :
Open Context Menu locator
Keep in mind that with this approach you also need to handle keyboard actions and file dialogs are not part of browser
1 Like
Hey @raivo , with the above approach i am facing lot of exceptions, can you guide me with any other approach.
raivo
May 22, 2023, 5:32am
9
Best course of action would be to try to solve issue with downloading from url. That would be most resilient option.
but with that i am unable to get image
even i am getting the correct url
raivo
May 22, 2023, 6:22am
11
If given url works manually then there is an issue with your code. You can try using RPA.HTTP instead of curl. Without any knowledge of target application and its structure its difficult to propose any approaches.
2 Likes