i have a scenerio in which i have created a sale order ai have automated all the task but some time to confirm sales order invoice it takes 10 seconds some time 20 seconds it vary depending on the traffic does any one knows how can i deal with this thing.delay activity is not suitable for this any other activity any body knows? what should i do to tackle this situation please tell
Is the any navigation happening when the sales order is confirmed? If there is any success message or a page that you may be redirected to after the confirmation then you can use ‘Find Element’ activity which will wait until that particular activity is visible and once visible it will continue the workflow. You may have to set the ‘Timeout MS’ to some maximum seconds that you feel your sales order takes to confirm.
Let me know if it helps.
yes @Rammohan91 when order is confirmed it navigates to different page. ‘find element’ will wait for that navigation page after order is conformed? and if i set it to maximum and suppose it gets completed with in 10 sec and my maximum time i have set is 50seconds than it will navigate to other page once its get confimed after 10 seconds right??
Yes, Identify a unique element from that navigated page and use Find Element activity with it. It should wait until the element is visible in the screen. Give it a try and let me know if it doesn’t work for you.
sure i will try and will let you know thanks
If that does not work, because you have set delay that would timeout at certain time … if you sure it will come back … try do_while activity, inside that add if -> if found, break, if not delay for X seconds – which will repeat until found.
If you want to be safe, then your do_while can try for certain time and give up by applying the condition.
@Rammohan91 it worked for me ‘find element’. but can you tell how can I set ‘timeout MS’
i want to change its time timeoutMS
Under ‘Properties’, Expand ‘Target’. TimeoutMs field should be available there.
i found it but donot know how to change it means how to give time
Give it this way 00:00:05 (for 5 seconds)
@Rammohan91 its not working its works only if we enter one record but some times it throws error .the thing i am trying to find is the message which comes after invoices is generated so i guess it might thrwoing eorror becasues its no ablr to find any element i have messed up please help me out
@Kemal can you please give me example which activity i should add in do while what expression should i wirte and ssame with if activity …my scenerio is that my sales invoice takes time to get process so i can use dealy as we donot know how much time it can take after that invoice is processed a massage apperar that is operation completed what should i do that after invoice process is completed the next activity should run please help
i hope its clear for you all plz help me outwhat activity should i use and how
So here is the logic
You have two variables:
var elementExists (Boolean) - set to false
var intTimer (Integer) - set to zero
Then you do activity element exists and find the element you need.
If element exists, great, if not then it will go into do while and try it 10 times with 5 second delay (image below). Each time after Delay it will check if image exists again.
You can change your variable from 10 to 100 or 9999 or simply say “false” if you are sure this will come back and should keep trying.
Hope this makes sense.
i will let you know about it once i am able to run my workflow through this logic
@Kemal its not working i guess elemnet exist is unable to find the operation completed message
and when i use message box for boolean variable its returning me false value i should return true
here the the screenshots
please have a look it to this