Setting up an iMacro to recognize multiple text and click the link in that line

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
yehuda
Posts: 14
Joined: Wed Oct 21, 2020 11:57 pm

Re: Setting up an iMacro to recognize multiple text and click the link in that line

Post by yehuda » Wed Dec 30, 2020 3:56 am

Thanks for catching the extra space!

It is not giving me an error but each time it hits the command it freezes up the program is 11 variables too much for it to handle?

Is there a lighter way to write this function?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Setting up an iMacro to recognize multiple text and click the link in that line

Post by chivracq » Wed Dec 30, 2020 4:22 am

yehuda wrote:
Wed Dec 30, 2020 3:56 am
Thanks for catching the extra space!

It is not giving me an error but each time it hits the command it freezes up the program is 11 variables too much for it to handle?

Is there a lighter way to write this function?

11 Vars, nope, I wouldn't think so, even if I've never "really" tested..., but I think I've often used 5 or 6 Wildcards (in one same 'TXT' or 'HREF' Param in some 'TAG' Command, and + a few Vars), and maybe more..., and I've never noticed any "Limitation" or "strange Behaviour"... :o
Test with only 2 or 3 first I would say, you had only mentioned 2 Criteria when you had posted your 1st Screenshot..., like I used in my Script...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
yehuda
Posts: 14
Joined: Wed Oct 21, 2020 11:57 pm

Re: Setting up an iMacro to recognize multiple text and click the link in that line

Post by yehuda » Thu Dec 31, 2020 7:03 pm

I tried testing it with 1 parameter and it worked fine. My problem starts when I add a second one.

Please see below for a screenshot of what the table looks like on the website and a screenshot of my CSV file. The error I am getting is that it cannot find HTML element of type "TR:" with attribute(s) "TXT:*PA*PATIENT NOT ENTERED".
Capture3.PNG
Capture4.PNG
The first line on the CSV fill should locate the 3rd line from the website based on just matching columns A and B. the ultimate goal is to match all columns.

VERSION BUILD=12.6.505.4525
TAB T=1
TAB CLOSEALLOTHERS
Set !DATASOURCE C:\Users\hostedservices\Documents\iMacros\CSVformacros\MInwagetest2.csv
Set !loop 2
Set !DATASOURCE_LINE {{!loop}}
SET !errorignore yes
SET !timeout_step 1

TAG POS=1 TYPE=TR attr=txt:*{{!col1}}*{{!col2}}
TAG POS=R1 TYPE=A ATTR=TXT:Edit
TAB CLOSE

Thanks again for all your help.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Setting up an iMacro to recognize multiple text and click the link in that line

Post by chivracq » Thu Dec 31, 2020 7:27 pm

yehuda wrote:
Thu Dec 31, 2020 7:03 pm
I tried testing it with 1 parameter and it worked fine. My problem starts when I add a second one.

Please see below for a screenshot of what the table looks like on the website and a screenshot of my CSV file. The error I am getting is that it cannot find HTML element of type "TR:" with attribute(s) "TXT:*PA*PATIENT NOT ENTERED".

Capture3.PNG

Capture4.PNG

The first line on the CSV fill should locate the 3rd line from the website based on just matching columns A and B. the ultimate goal is to match all columns.

Code: Select all

VERSION BUILD=12.6.505.4525
TAB T=1
TAB CLOSEALLOTHERS
Set !DATASOURCE C:\Users\hostedservices\Documents\iMacros\CSVformacros\MInwagetest2.csv
Set !loop 2
Set !DATASOURCE_LINE {{!loop}}
SET !errorignore yes
SET !timeout_step 1

TAG POS=1 TYPE=TR attr=txt:*{{!col1}}*{{!col2}}
TAG POS=R1 TYPE=A ATTR=TXT:Edit
TAB CLOSE
Thanks again for all your help.

Alright, if it works with one Var, and I guess you probably tried like this:

Code: Select all

TAG POS=1 TYPE=TR ATTR=TXT:*{{!COL1}}*
..., then that means the 'TR' Type is correct, which wasn't sure at all as I had used that HTML Type for the Implementation I had posted which consisted of saving your '.csv' File as '.html' from 'Excel', which I know does create a 'TABLE' Element with 'TH' / 'TR' / 'TD' Elements, it was not "meant" for the Webpage from your Online App..., which "luckily" also uses a 'TABLE' Element thus... Good... :D
(Looks like a 'PeopleSoft' CRM App btw, correct...?)

But when you try with more than just 1 Var/Criteria, you also need to use Wildcards after/around all Vars, the Row does not finish at Col_2, ah-ah...!
=> Like this:

Code: Select all

TAG POS=1 TYPE=TR ATTR=TXT:*{{!COL1}}*{{!COL2}}*
And again, use ALL UPPERCASE for iMacros Commands and Params and Built-in Vars..., you are introducing some supplementary "Risks" by using for nearly all Commands Lowercase nearly everywhere instead... :!:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply