cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vaibhavtandon87
Helper IV
Helper IV

how to optimize right click in web automation?

Dear community,

 

I use service now and in service now if you have to download a report, one would have to right click to get the export / download option in excel/csv.

 

Any suggestions on how to  download / optimise the extraction of data?

 

Currently it does get recorded but as soon as I run it failing as its not able to find elements.

 

Thanks!

13 REPLIES 13
PetrosF-MSFT
Microsoft
Microsoft

Hi @vaibhavtandon87 

 

Let me note some of the ways that you can follow to download the file:

 

1.  Use the "Click download link on web page" Action (works only with the Automation Browser). 

This Action handles all the download procedure, from clicking on the button to downloading and saving the file locally.

 

2. Use the "Download from web" Action. 

In case there is a URL behind the download button, you could use this Action to directly target that URL and download the file locally.

 

3. Use one of the following Actions to send a right click and make the export/download option appear: "Move mouse to image","Move mouse to text on screen","Send mouse click"

 

I hope that helps!

 

 

@PetrosF-MSFT  Thanks for your reply. Please see my comments:

 

1) I am not getting automation browser option, do I have to change any setting? I am only getting Edge, Chrome and IE.

2)If i use second option using get I get the following error - Robin.Core.ActionException: Failed to download from web: The remote server returned an error: (401) Unauthorized.. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized. 

 

I have entered my credentials but not sure why the error is coming.

 

3) It still gives error:

 

Robin.Core.ActionException: Right click failed (failed to get window) ---> Robin.Shared.Runtime.ActionException: Right click failed (failed to get window)
at Robin.Modules.UIAutomation.Actions.UIUtils.TryFuncThrowExceptionIfNull[T](Func`1 func, ActionException ae)
--- End of inner exception stack trace ---
at Robin.Modules.UIAutomation.Actions.ClickElementInWindow.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

Hi @vaibhavtandon87 

 

Please check my comments below:

 

1. Automation Browser is based on Internet Explorer. While configuring the "Launch new Internet Explorer" Action, you can choose between "Automation Browser" and "Internet Explorer".

 

2. Maybe the server requires additional authentication, or the URL is not pointing to a file that can be directly downloaded from the web without the use of a browser. I would suggest trying changing the Actions properties a little bit and if that doesn't work, we could choose another approach.

 

3. I noticed you are using the "Click UI element in window" Action. This is a UI Action which is able to interact with desktop applications. It wouldn't apply in your case since you are automating a web browser.

Hence, I suggest that you use one of the below Actions:

  • Move mouse to image
  • Move mouse to text on screen
  • Send mouse click

All the above could send a right click using the actual mouse pointer.

 

I hope the above helps!

Hi @PetrosF-MSFT  thanks again for your response!

 

Unfortunately I am not able to get anywhere 😞

 

2) I changed the URL and I am able to get a file downloaded but the file is '.DO' file extension and doesnt give me data I was looking for. Any suggestions how can I get i excel/CSV?

 

3)a) Image gets captured but not moving to the correct image on screen.

b)Move mouse to text on screen is asking for OCR, not sure what to enter?

c)Send mouse click - difficult to get the X,Y coordinates sorted to move to the correct postion

 

 

Hi @vaibhavtandon87 

 

1) May I ask if you tested option #1 with the Automation Browser?

 

2) Looks like the URL isn't the correct one or the web site doesn't allow us to directly download the file

 

3) a) Try setting the screen resolution to 100%. Also have in mind that if there is a similar image on screen, we would need to change the "Occurrence" parameter

    b) You could enter the text (if any) contained in the image

    c) You are right, this functionality will be enhanced and the coordinates will be retrieved automatically. In the meantime, please feel free to play with the coordinates until you find the correct ones. Have in mind that they depend on the screen resolution.

@PetrosF-MSFT Thanks for the response!

 

1) I tried the option but not getting any option of Automation browser. Attaching screenshot for reference. Also the problem is 'more info' button has a bug and doesnt take you to information page. Please guide me where is that option available.

 

2) let me check with IT department what will be the exact URL. I was referring to the documentation given on Service now page.

 

3) c) ok, will wait for functionality to be upgraded

Web recorder IE.png

Hi @vaibhavtandon87 

 

You are right that you cannot access the Automation Browser through the Web Recorder - you would need to manually create the flow. You can drag and drop the "Launch New Internet Explorer" Action on your workspace, and the "Automation Browser" is the first option:

PetrosF-MSFT_0-1601568522925.png

 

Here are some additional info about the aforementioned functionality:

https://docs.microsoft.com/en-us/power-automate/ui-flows/desktop/actions-reference/webautomation#lau...

https://docs.microsoft.com/en-us/power-automate/ui-flows/desktop/internet-explorer-vs-automation-bro...

 

I hope the above helps!

 

@PetrosF-MSFT  Thanks for continuous help and taking out time to respond to my queries and comments.

 

I used it as manual step but unfortunately it didnt work and gave error:

 

Robin.Core.ActionException: Failed to launch automated Internet Explorer.
at Robin.Modules.WebAutomation.Actions.LaunchInternetExplorerBase.Execute(ActionContext context)
at Robin.Runtime.Engine.ActionRunner.RunAction(String action, Dictionary`2 inputArguments, Dictionary`2 outputArguments, IActionStatement statement)

Hi @vaibhavtandon87 

 

In case you are accessing a public website, please share the URL so that I can try and reproduce the issue.

 

Thank you!

Hi @PetrosF-MSFT ,

 

Its not a public URL and I am afraid I would not be able to share the URL. 😞

 

Please let me know your thoughts how best we can proceed or resolve this.

Same error message by using a public website like google.com

CRMDynamics
New Member

I also get the same "Failed to launch automated Internet Explorer". Side note, when launching regular IE I am unable to extract data from a web page, so was hoping maybe the automated browser may work.

DavidH1
Frequent Visitor

I am having same issue today and not able to use automation  browser. Received the error message: "Failed to launch automated Internet Explorer" - Tried with "www.google.com.au"

 

I was trying to use automation browser so I could download a file from link and move that file to a specific folder - couldn't do that with standard Chrome/Edge/Firefox so it suggested using Automation Browser.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,172)