saucepleez / taskt

taskt (pronounced 'tasked' and formely sharpRPA) is free and open-source robotic process automation (rpa) built in C# powered by the .NET Framework
http://www.taskt.net/
1.09k stars 351 forks source link

Bug with loops and if? #182

Closed jaribeiro73 closed 4 years ago

jaribeiro73 commented 4 years ago

I wrote a script that has a loop of type list (it loops a list of customers). This works fine. Inside that loop, I have another loop of type continuously. Inside this last loop I have an if/else command. If page has a specified css selector do this, else if page has another css selector do that, else pause script for 1000ms. What happens is that the continuously loop will do always what is defined for the first IF, even if the css selector is the one defined to the second css selector (second if). So, my question is: is there any known bug or limitation that does not allow us to have this nested commands or if we use a loop of list type we cannot use a loop of continuously type inside of it?

saucepleez commented 4 years ago

Hello,

I was unable to recreate the issue in the scenario given. Please take a look at the sample I created (rename to .xml extension) and let me know if it is similar to your requirement.

customer loop.txt

jaribeiro73 commented 4 years ago

Hi @saucepleez. This one was hard to solve. There isn't a problem with taskt. The problem was linked to the way the website was done. The webpage had a filter and the results could be a nogridresults class or a gridcontainer class. It shows one of these classes, however, the webpage has both classes. So, if I say taskt to do something if a nogridresults class exists, It will do that thing even if there are results, because the nogridresults class and the gridcontainer are both in the webpage even if only one is shown.