Page 1 of 1

How do I click either of two links the SAME row of a table

Posted: Mon Nov 07, 2011 12:55 pm
by evanspj1
Hello,

I am using iMacros to automate uploading feedback files and updating the gradebook in the Moodle Learnign Management system.

Below is an image of the gradebook with the important columns being the student username and the status column. The status column will show either "Grade" or "Update" depending on if some feebback ahs already been given.
gradebookinmoodle.jpg
the gradebook in Moodle
The macro searches for the student username and then "clicks" the next "Grade". This works find as shown below:

TAG POS=1 TYPE=TD ATTR=TXT:demo002
TAG POS=R1 TYPE=A ATTR=TXT:Grade

I then want to make is a little smarter and let it click either "Grade" or "Update" and this works with

TAG POS=1 TYPE=TD ATTR=TXT:demo002
'set !errorignore = yes allows imacros to continue even through there is an error ... effectively ORing the two links "update" or "grade"
'SET !ERRORIGNORE YES
'TAG POS=R1 TYPE=A ATTR=TXT:Update
TAG POS=R1 TYPE=A ATTR=TXT:Grade
'SET !ERRORIGNORE NO

The problem is that I want it to "click" the update or the grade link for that specific student (in that row of the table) and not click the link in the next row.

How can I use POS to search for the next link (either "grade" or "update" in the current row?

Any assistance gratefully received.

Peter Evans
eMarkingAssistant.com

Re: How do I click either of two links the SAME row of a tab

Posted: Mon Nov 07, 2011 1:07 pm
by MattBell7
change TXT:Grade to TXT:* but please note, this will click the next link, regardless of what it says, so not just update/grade

Re: How do I click either of two links the SAME row of a tab

Posted: Fri Nov 18, 2011 6:25 pm
by Tom, Tech Support
Hello evanspj1,

What version of iMacros are you using? With the iMacros Browser and iMacros for IE, you can limit the search range of the TAG command by setting the !ENDOFPAGE variable.

http://wiki.imacros.net/Data_Extraction ... arch_range