Assignment 2 empty datatable and keeps on looping

hi guys, me again :wink:
so on to Assignment 2, my Process.xaml is going through the pages, i tried to write the output to an excel file and it is blank plus after reaching the last page, everything loops back to the init, please advise what i am missing here. thanks again.

Process.xaml (15.4 KB)

Try using Append range instead of Write Range.

If you use Write range, it will keep overwriting from range “A1” for every page.

Hi @Twits_Rombaoa

Why are you using read range ?

image

Nothing has been written in file means dt_WorkItems dont have any rows when extracted, please verify that data scrapping is properly working

Thanks,
Prankur

yes, i understand that, but the thing is, there is nothing being written at all, so it only means that my dt_WorkItems is empty, right?

trying to figure that out, i created a separate workflow just to test, the workflow is going through the pages but then i am getting this error. do you know what could this mean? i don’t recall needing to initialize anything when writing a dataTable to an excel file…

image

Try to initialize the table

Then before Excel App Scope, Write Line

dt_WorkItems.Rows.Count.ToString to verify if the data has been scrapped properly.

Thanks,
Prankur

1 Like

perfect, thanks mate, now let me apply this to assignment 2 :slight_smile:

ok, that fixes the issue of empty DataTable, now the other issue with my Process.xaml is that it loops back to Init after that.
i got this warning: Activity timeout exceeded at Source: On Element Appear ‘SPAN’

for my On Element Appear, the Selector is this:
<html title='ACME System 1 - Work Items' /><webctrl aaname='"+in_TransactionItem+"' tag='SPAN' class='page-numbers current' />

This looks okay to me .Just see that Repeat Forever property for Element On Appear has been set to false

cool! now it works and i see transactions in the Orchestrator, but when it is about to process the next Transaction, i am getting this:

this is the Selector for my Click: "<html title='ACME System 1 - Work Items' /><webctrl aaname='"+in_TransactionItem+"' tag='SPAN' class='page-numbers current' />"

my in_TransactionItem argument is set to TransactionItem in the invoke process, is this correct?

Click selector should be this

<webctrl aaname='"+in_TransactionItem+"' tag='LI' />

Thanks,
Prankur

i did this and the workflow went on infinite loop

{
“message”: “System exception. Retry: 0. The target Element was not specified for this activity. You should set its Target property or use this activity inside of a scope activity (Attach Browser, Open Browser, Open Application, Attach Window, Get Active Window, Element Scope activities). at Source: Click”,
“level”: “Warning”,
“logType”: “User”,
“timeStamp”: “15:53:37”,
“processVersion”: “1.0.6892.28599”,
“fileName”: “SetTransactionStatus”,
“jobId”: “553f55c7-9e71-4ae0-96f2-fd6e844b508a”,
“robotName”: “LocalMachine”,
“logF_BusinessProcessName”: “Framework”,
“logF_TransactionStatus”: “ApplicationException”,
“logF_TransactionNumber”: “1”,
“logF_TransactionID”: “1”,
“logF_TransactionField1”: “”,
“logF_TransactionField2”: “”
}

Where have you used Click activity?

it is the 1st activity in my Process.xaml, i added the html title, it stopped the loop but error in processing transaction 2 and on…

Process.xaml (13.4 KB)

image

Try this

image

and make sure highlighted one

image

Thanks,
Prankur

yes, repeatforever is False for my On Element Appear, and after putting the Click inside If, it went through the loop with the same error/warning

if i manually click on the page numbers, the transactions are completed, so definitely something is wrong with my Click activity :smiley:

Click activity should not be in On Element Appear it should be above On Element Appear

hi Prankur, yes that’s how I set it up, you can see it in my Process.xaml

See above posts try to implement that if condition if that works