A9T9 / RPA

UI.Vision: Open-Source RPA Software (formerly Kantu) - Modern Robotic Process Automation with Selenium IDE++
https://ui.vision/rpa
Other
1.22k stars 286 forks source link

Execution of commands stops #35

Closed roboserg closed 6 years ago

roboserg commented 6 years ago

Basically the console says "[info] Executing: | pause | 9000 | | " and it just doesn't do anything. Same happens with other commands like "open" and others. The IDE itself works and is not frozen, its just the execution of the command stops. See pictures below:

https://puu.sh/zz2k2/094ef31e88.png https://puu.sh/zz2oz/525f964c13.png https://puu.sh/zz2p2/dd6026b9f7.png

!TIMEOUT_WAIT is set to 10, nothing happens after 10 seconds, it just gets stuck.

Using win10 64 bit, latest chrome and IDE plug in.

ps. it doesnt happen for ALL commands, sometimes the steps work, sometimes they dont. Really weird and smells like a bug.

A9T9 commented 4 years ago

@LucaAlimandi Do you have a test case for us? A small macro + CSV file that shows the issue will be great. As soon as we can recreate the issue, we can fix it.

LucaAlimandi commented 4 years ago

@A9T9 Thanks for your answer! It is very difficult to me to provide a working macro to reproduce exactly the timout error, as the pages I am testing reside on a private site, not reachable by the external world. So I tried to create a test that works the same way using Google serach page, but it is not so simple. I send you this macro along withe the related CSV file. Anyway, while trying to write such a macro, I noticed another problem that could be related with the timout error. In this case I just created a CSV file with some strings in the 2nd column that are passed to the Google search page on each loop, reading one line of the CSV per loop. The first thing I noticed is that the first time I run the test, the macro hangs very soon, probably at the very first loop. I think that this is related to the browser cache, since launching it several times it start to run regularly. But the problem seems to rise running the command waitForElementPresent by which I test the serch has been completed (the element id=resultStats reports the time spent by the servere during the search). Infact if I don't use this trick, there is the risk to click the button to open the pages that has been found too early, resulting in a macro failure. Another way to avoid the problem would be to insert a puse, but this is not a good practice in that the pause would be of fixed lenght and search time could be much variable. So, using the waitForElementPresent and waitForElementVisible is a better way, that optimizes execution time, expecially over a great number of loops . But it is very strange that the resulting error is: [error] Error #101: Kantu is not connected to a browser tab It seems that Kantu doesn't wait for the element to be present (or visible) because in all cases I have tested the research time never was more then 1 second. I think that Kantu should wait much more than this, so why immediately it hangs with this error?

Anyway, after some hanging starts, the macro works fine. I still don't know what exaclty makes the macro working, but it seems that opnening and closing Chrome, putting it in icon mode, and same for Kantu, at last makes the test go on...

Another thing I noticed is that sometime the macro goes on but sopts if I try to open Windows Explorer to browse the file system; or if I pause and restart the macro execution in Kantu.

The overall behavior seems to be very tricky and impredictable, and I think this is related to other problems I have seen when testing for presence or absence of some element, or reading a new line of the CSV file for the next loop.

I hope theese notes will help you a bit to investigate the problem. Let me know if I can test other cases...

Thank you very much!

loop.zip

LucaAlimandi commented 4 years ago

P.S. Some time the error is this one (or other similar):

[info] Executing: | waitForElementPresent | id=resultStats | | [error] Could not establish connection. Receiving end does not exist.

It seems always it is related to timeout issues...

LucaAlimandi commented 4 years ago

@A9T9 Any news about the issue?... Thanks!

LucaAlimandi commented 4 years ago

@A9T9 Good morning. Are there any news about this issue (Execution of command stops #35) ? Recently I tried to import the test I was having problems into Selenium IDE. The problem is even worse there in that the test stops immediately after the first download (I opened an issue about this within Selenium IDE discussion group...). In that case the problem seems to be related to the fact that the browser opens a frame or a different page after the download finishes or to let the user select a folder where download the file. What happens is that Selenium from this point on does not "see" the page anymore, so any subsequent command related to elements in the page cannot be executed, thus freezing Selenium test. I tried differnt combinations for the settings both in Chrome and in Firefox in relation to the behaviour of the download section, but none of those settings solved the problem.

Is it possible that the issue in Kantu has a similar cause? This could be true, as the log reports "Error #101: Kantu is not connected to a browser tab"...

Please let me know if there is some news about, or if I can help you in solving the problem by answering some questions.

Thank you! LA