clear cursor

Asked by Asheru

Hello,

I am trying to automate a desktop app. It's an app that draws electrical diagrams. So i can select an element from an acessories list and then drop it to the diagram.After i select my element and then click add, the element is added to the cursor and then I can hover and click in the region to drop it to the schema. The problem is that sometimes after I add the desired element to the cursor and then drop it to the schema. It adds multiple elements instead of just one.
I have a video to demonstrate this. So i have successfully added the first 2 elements to the diagram there, then i want to add the 3rd one and test fails. My app remained open and I could reproduce this manually but if i want to reproduce this fully manually it won't work. So the question is, it seems not to be a problem from my test app, is this something from sikuli? can i clear whats glued to the cursor?

The link for the video : https://www.dropbox.com/s/ifpu5toluarqlv9/hager_multi_select.mp4?dl=0

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Looks impressing ;-)
... but I cannot help you.

Might be you have to add more wait's at specific places in your workflow.

To reset the mouse cursor, it sometimes helps to click a place where nothing else happens but a reset/clear.

Typing ESC sometimes might help also.

But all this depends on the app features.

When working manually, we tend to use short ways on a GUI and react very flexible.
When automating it sometimes is better, to start always in a specific neutral GUI state (which of course might mean more searches and clicks to do, but hey: it is automated ;-)

Revision history for this message
Asheru (asheru93) said :
#2

hmm...already tried those but problems still persists

Might be something from the app then not from sikuli

Revision history for this message
Asheru (asheru93) said :
#3

I cannot reproduce this manually. However if i add an element then CTRL+Z (undo) and add it again, my tested app is adding 2 elements, then if i do undo again, it adds it 3 times so this is a bug. The same bug reproduces again in my sikuli script but not by doing 'undo' it just come after simply adding some elements. Could this be something from my app?

Just asking for an opinion because my manager says that it's from sikuli/my sikuli script not from the app. But however since i could reproduce this bug in another way manually i;m not so sure.

Thanks.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

--- my manager says that it's from sikuli/my sikuli script not from the app
The SikuliX features as such are surely not responsible for your problems, but your script might produce these problems (see comment #1).

... and as mentioned: in SikuliX workflows some actions on the GUI might happen too fast one after the other and then produce odd behaviours of the GUI. This can either be solved by intervening wait()'s and or checks with exists() in between.

The only way to impress your manager:
Manual click/type/paste workflows have to be modelled in a script EXACTLY so, to compare manual and automated behaviour.
The manger sees what you are doing manually, but he might not understand, what your script does and hence he tends to distrust the script or even SikuliX.

Revision history for this message
TestMechanic (ndinev) said :
#5

An important note here.

Sikuli doesn't know anything about your application beside image on the screen. Any actions performed by Sikuli are not specific to your application. It just happens your app to be on focus when actions are performed :-). So chance of Sikuli wrong doing is low.

In contrast popular UI automation like Test complete and likewise are drilling down in application DOM and sending events to DOM elements. Same is for Selenium against web apps. And here tool can mess things since it is interacting not on a UI level but on DOM

And back to original question:
I am interested to try this problem if there is a trial version of this design app.

Revision history for this message
Asheru (asheru93) said :
#6

Thanks guys for your responses.
I'm just back from vacation so back to work.

@TestMechanic

Here you can find the trial version I guess, if you wanna try:

https://www.hager.de/software/hagercad-planungssoftware/326112.htm

Revision history for this message
Asheru (asheru93) said :
#7

@TestMechanic

In order to add those elements after starting the program, you have to create a new project then from Schema->multifiliare schema(multi-wire diagram) then click suivant like 4-5 times, then terminer and then you can add elements to the diagram.

Revision history for this message
Asheru (asheru93) said :
#8

@TestMechanic

In order to add those elements after starting the program, you have to create a new project then from Schema->multifiliare schema(multi-wire diagram) then click suivant like 4-5 times, then terminer and then you can add elements to the diagram.

Revision history for this message
TestMechanic (ndinev) said :
#9

I installed trial expert version and created a project however my project looks different and Schema is missing

Here is the difference - https://www.screencast.com/t/dCFGvPsx

You can record short video to show how to create schema starting from new project

Revision history for this message
Asheru (asheru93) said :
#10

https://www.dropbox.com/s/hi11xr5esatg7s5/20190104_093820.mp4?dl=0

Sorry, i forgot that I've only found the german version for trial. So here is the link with the steps to configure the schema. I've also added 2 elements to it to see how it's done. This issue happens when i'm trying to add 2-3 different elements to the diagram.

Revision history for this message
TestMechanic (ndinev) said :
#12

Seems like I was able to automate this scenario and there is no side effects like one you are reporting

Here is the video record of the run(not sure why mouse was not recorded in the video)

https://www.screencast.com/t/qORcRw6sXK

At the beginning of the video you can see the test script as well

Revision history for this message
Asheru (asheru93) said :
#13

Thank you for feedback. In the end I was also able to do it without problems. I think the mistake was that I was doing doubleClick() instead of click in some places .

Can you help with this problem?

Provide an answer of your own, or ask Asheru for more information if necessary.

To post a message you must log in.