cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Operation is not valid due to the state of the object

GracieDevine
Level 4
Hello,

I am working with a bot that my predecessor built and am switching the process from the test to dev environment. In the code there is a Navigate Stage to press the Edit Line icon on a webpage and in both environments Application Modeller can highlight the icon. However, when I run the process in dev I get the error: operation is not valid due to the state of the object.

I've attached screenshots of the Navigate Stage, the edit line icon (that Application Modeller can highlight), and the error message in the session log.

Could someone please explain what this error means? I tried to find Blue Prism documentation about it, but couldn't. I interpret this error to mean that I can't use Press as an action in my Navigate Stage, but don't know how else I'd go about it (unless I re-spy the element?).

36668.png

36669.png

36670.png
1 BEST ANSWER

Helpful Answers

PvD_SE
Level 12
Hi Gracie,

My two cents:
  • Could it be that you're not yet attached to the object? If not: attach first and verify that the attach was successful.
  • If you are attached and connected: In the Application Modeller, can you highlight the indicated element (button in this case) and all other elements? If not: re-spy.
Let us know your progress, or new questions.
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

View answer in original post

3 REPLIES 3

PvD_SE
Level 12
Hi Gracie,

My two cents:
  • Could it be that you're not yet attached to the object? If not: attach first and verify that the attach was successful.
  • If you are attached and connected: In the Application Modeller, can you highlight the indicated element (button in this case) and all other elements? If not: re-spy.
Let us know your progress, or new questions.
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

AmolJangam
Level 4
Hi Gracie,

What is the server OS version?
It is internal error and it may be due to .Net Framework version on your server.
Please check the following link:
https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2011/ms11-100?redirectedfrom=MSDN

Hope it helps.

GracieDevine
Level 4
Hi Paul,

I re-spied the element and it worked! But actually, I got the same error at another stage in the process and used the attach method you suggested here (and it worked).

36667.png
Thanks for your help! And while I have you, do you know if it's best practice to attach before or after the wait stage?