Determine if Mouse Cursor is Busy

uiautomation

#1

Hi all,

I’m working with several web based applications where I’m required to input financial data, save my input, move between various screens within the application, etc.

Each of the above actions require a certain load time by the application, which varies throughout the business day.

During a load time, the mouse cursor (pointer) has the spinning blue circle next to it, so I’m wondering if there’s a way to capture this “cursor busy” state and use it instead of a hard time delay?

Unfortunately, the web page itself does not register as “loading”, so setting the Wait for Ready property to Complete does not work.

Thanks in advance for any suggestions!

Regards,
Dan


#2

Did you try

cursor.Current.ToString

Just tried on IE by opening Microsoft page, seems to be working. Validate on your end.


#3

Sorry for opening an old topic, but I am in need of this as well.

I tryed to use above solution, but UIpath does not reconize Cursor as a variable.
Do i need to do something more to make it reconize the cursor?


#4

Hey @Konrad

you have to import “System.Windows.Forms” namespace first then you will be able to use Cursor.Current in your project.

or also

you can use like this but better to import namespace

System.Windows.Forms.Cursor.Current.ToString

Regards…!!
Aksh


#5

And that worked just perfectly. Thanks alot!


#6

I’m in a Remote Desktop application … I tried using cursor.current - but it ALWAYS returns cursor busy

how can I detect the state of the cursor in a Remote Desktop (ie. Citrix) environment?

I tried capturing the image of the cursor - that doesn’t seem to work either


#7

Hi, Did anyone find a solution to get the Current cursor status? I am facing this issue too.

I would like to capture the blue loading sign next to the cursor and find out when it is done loading and back to the normal cursor.

Thanks in advance.


#8

In Citrix or Destop? If Desktop, What does the cursor.Current ouput say in your case?


#9

On my desktop


#10

You can check two things

  1. Check Cursor.Current.ToString
    While(System.Windows.Forms.Cursor.Current.ToString = “[Cursor : WaitCursor]”)
    {

    }

  2. Check your process status
    While(proc.Responding = False)
    {

      }

#11

How to kill a process.
I am unable to kill the process even after declaring the process name in property.
it say process not declared ??

Any help
Regards
Bharath


#12

Can u show how u are doing? a screenshot?

possible cases:- if you are passing correct process name then check the process is in running state or not ?

better to use Get Process Activity to get all process then from there you can check and match.

Regards…!!
AKsh


#13

Gentlemen,

This is a great approach. I’m using this for a webpage that is loading some data, with the UI Path Community edition. The issue I have now is that I had this working for a few days. Unfortunately now it doesn’t work and the Cursor.current never changes from the WaitCursor state. After the loading is done, the spinning stops, but when I do a writeline, it still says it’s in the WaitCursor state. Is this an issue with my OS, UIPath, or am I doing something wrong?

The while condition is: System.Windows.Forms.Cursor.Current.ToString.Equals(System.Windows.Forms.Cursors.WaitCursor.ToString)

So it sits there until the loading on the webpage is done, and then it should move forward. Originally it did, but not sure what happened that it doesn’t update the Cursor.Current value to Default.

Any thoughts?

Regards,
Yasir


#14

Hi, i am trying to use this solution. I want to get the current cursor status, but i always get “[Cursor : WaitCursor]” no matter what the cursor real status is. I am in desktop application.

Any suggestions?

Thank You


#15

Hi i am also facing the same issue were you able to resolve it ?


#16

No resolution. The workaround I used was to see when an object/popup box appeared to trigger my activity.