How to automate "favorite song" in Spotify with global hotkey?

Hi guys,

Complete RPA newbie here. Had experience in AHK before, but never before in UiPath.

For starters, I’d like to learn how to automate “favorite song” in Spotify with global hotkey. I tried playing with it but got the following error:

[code]The workflow has validation errors. Review and resolve them first.

System.Activities.InvalidWorkflowException: The workflow has validation errors. Review and resolve them first. —> System.Activities.ValidationException: Value for a required activity argument ‘Selector’ was not supplied.
— End of inner exception stack trace —[/code]

Hi,

You get that error because two activities in your workflow are missing the selector: Click Trigger and Key Press Trigger. For both of these activities you need to click on “Indicate element on screen” and then point to the element (button / text box / control / entire form / window) that you want monitor for clicks and key combination.
The “selector”, which is used by the robot to identify the control to operate, will be then added to the activity.

If you just started automation with UiPath Studio, I would recommend you to create an account on http://academy.uipath.com and to take the Level 1 - Foundation course. Many other courses are available and you can take all, if you want, free of charge.

Best regards
Silviu

1 Like

I tried using anchorbase, get element, click but to no avail as I realised that UI Explorer is unable to detect the elements in Spotify app (it highlights the entire application). what alternative can we try?

I noticed the same for Word documents too. The whole body (or main screen, except the ribbon and buttons above) is highlighted and I am unable to scrape tables from word documents.

Yes, it looks like individual elements are not detected inside the Spotify desktop application. I had a look using UiExplorer and seems that it is build using HTML and rendered using Chrome application.

On that application you can use Citrix Automation (basically Click Image and Send Hotkeys) but I would recommend you to try to automate the browser version.

You can open Spotify online app in a supported browser and automate it there. Internet explorer is supported native, while for Google Chrome of Mozilla Firefox browsers you need to install a plugin for UiPath to be able to detect elements.

For Microsoft Word is a similar situation. Elements inside the document can’t be selected directly.
You should install the UiPath.Word.Activities package and use the available activities there. But currently there is no activity do extract tables from a documents. You can try to export it as PDF and then extract the table from PDF file. Or you can read the entire text and use string manipulation / regular expression to get the information you need.

Hi there, I tried using Click Image but the selector seems to be static. E.g. If I did not maximize the window or if I ran this script on 2 monitors with different resolutions, it will fail. The web version is not ideal as the desktop version as it is not native. Any tips?

In addition, I noticed quite a long lag for attach window (maybe 2 seconds) even though timeout was set to 0. any idea to reduce delay time?

For Word Activities, is there a Find Text function, so that I can use hotkeys to navigate through tables?

I tried converting to PDF, using Anchor base + Get Element + Get Text and it does not work well with nested tables.

I highly recommend to use the web application, it will be much easier to automate than using an Image based automation for the desktop application.

For Word activities, there is no Find Text function, as of now, but you can use CTRL+F and the Navigation functionality in Word application.