Selector does not work after invoking it

Hi there,

I have faced a problem never faced before and did not find any information in the forum:

My code and the selector works easy. I don’t have any argument nor variables in my code. But as soon as I invoke my function, the robot is not able to find the selector anymore. (I did not change the selector)

Did anyone face such a problem? As always, thanks for your outstanding help :slight_smile:

Best regards
Simon

Make sure that the page you have selected or the page you are trying to select is opened when the workflow reaches the particular activity @SimonLenz… I think that is the Issue.

Can you post the screenshot of the error you are getting?

Hi @SimonLenz

Just like @HareeshMR mentioned, for the selector to work, the application or the web page should be active in the background by the time it gets to the point where it checks for that element. If that’s not happening, you might need to get some activities in place before the selector check to get the page or the application to the required state.

Hi Folks,

thanks for your answers and advices. My problem here is that the page (actually a Word Document) is open and before, the robot is able to click. After clicking I use some “send hotkey” activities before I want to close the word document by clicking on the X in the upper right corner. (I need to click the X, close application activity would not help).

Hence, everything works until I need to close the document by clicking the X. I tried attach window and activate activities but nothing helped. AND: It always works when I run the single function. Just not, after I invoked it to the whole process.

Thanks and best regards
Simon

@SimonLenz,

Try giving some delay before and after clicking the “X” mark so that the application will close it. But I hope it is asking to save or not .

Thank you, but could you please let me know how to stop it, I am new in this

You will have delay activity available use it before and after the click activity and give the time as 00:00:05 for 5 seconds delay…

I tried it before with 3 seconds - did not work. So, since I was really desperate, I tried 5 seconds and it actually worked. Thanks @HareeshMR

Glad you got the solution @SimonLenz

Happy to help :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.