IMacros TAG Case-Insensitive

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
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
Post Reply
steve69a
Posts: 7
Joined: Sat Jan 03, 2015 5:35 pm

IMacros TAG Case-Insensitive

Post by steve69a » Sat Jan 03, 2015 5:39 pm

Hi!

Is there a way to use Case InSenSitive TAG's ?

I am using iMacros to look for specific words on a webpage.

Currently, I have to do variations of each keyword which results in the script having to timeout for each TAG not found.

TAG POS=1 TYPE=A ATTR=TXT:mortgage EXTRACT=txt
TAG POS=1 TYPE=A ATTR=TXT:Mortgage EXTRACT=txt
TAG POS=1 TYPE=A ATTR=TXT:MORTGAGE EXTRACT=txt


Is there a way to possibly do TAG with Case InSensitive Tags or possibly have the TAG look for more than 1 version of TXT. Something like

TAG POS=1 TYPE=A ATTR=TXT:(MORTGAGE|Mortgage|mortgage) EXTRACT=txt

Thank you for your help!!!
chivracq
Posts: 8308
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IMacros TAG Case-Insensitive

Post by chivracq » Sun Jan 04, 2015 12:35 pm

steve69a wrote:Hi!

Is there a way to use Case InSenSitive TAG's ?

I am using iMacros to look for specific words on a webpage.

Currently, I have to do variations of each keyword which results in the script having to timeout for each TAG not found.

Code: Select all

TAG POS=1 TYPE=A ATTR=TXT:mortgage EXTRACT=txt
TAG POS=1 TYPE=A ATTR=TXT:Mortgage EXTRACT=txt
TAG POS=1 TYPE=A ATTR=TXT:MORTGAGE EXTRACT=txt
Is there a way to possibly do TAG with Case InSensitive Tags or possibly have the TAG look for more than 1 version of TXT. Something like

TAG POS=1 TYPE=A ATTR=TXT:(MORTGAGE|Mortgage|mortgage) EXTRACT=txt

Thank you for your help!!!
In your Double-Laziness you forgot to check one Parameter...

And Pfff, check the Command Reference, there is your Answer...
(The Wiki is not only meant for Goats and other cowing Beasties... :idea: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
steve69a
Posts: 7
Joined: Sat Jan 03, 2015 5:35 pm

Re: IMacros TAG Case-Insensitive

Post by steve69a » Sun Jan 04, 2015 3:11 pm

Say what? I am unsure what you mean. I have checked the Wiki. I see the function SEARCH, but this won't work the way I need it to since I do not know how the html elements will be on each separate page.
steve69a
Posts: 7
Joined: Sat Jan 03, 2015 5:35 pm

Re: IMacros TAG Case-Insensitive

Post by steve69a » Sun Jan 04, 2015 4:47 pm

Here is the only part with reference to case insensitive

Spaces can be written as <SP>, or the content should be put inside double quotes ("). The comparison in the latter two cases is case insensitive and wildcards (*) can be used. In multiple selection menus multiple selection can be achieved by listing indices separated by a colon (:).

TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=NAME:select1 CONTENT=$Apple:$*berry*:$Peach
TAG POS=1 TYPE=SELECT FORM=NAME:form1 ATTR=NAME:select1 CONTENT=#1:#3:#8

I have tried all possible ways to make this work. but it looks like it's only for SELECT in an Input form.
chivracq
Posts: 8308
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IMacros TAG Case-Insensitive

Post by chivracq » Mon Jan 05, 2015 8:17 am

OK, then we start from the beginning...: CIM...! :mrgreen: (I don't answer Threads when that Info is missing... (That's what I meant about being too lazy... (to read the Forum Rules...)))
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
steve69a
Posts: 7
Joined: Sat Jan 03, 2015 5:35 pm

Re: IMacros TAG Case-Insensitive

Post by steve69a » Mon Jan 05, 2015 2:33 pm

LOL, ok. MB.

IMACROS Version: 8.0.2.1970
Firefox Version: 33.0
Windows Version: Windows 7 Ultimate 32-bit
chivracq
Posts: 8308
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IMacros TAG Case-Insensitive

Post by chivracq » Mon Jan 05, 2015 2:58 pm

steve69a wrote:LOL, ok. MB.

IMACROS Version: 8.0.2.1970
Firefox Version: 33.0
Windows Version: Windows 7 Ultimate 32-bit
Finally..., good...! (Even if v8.0.2 is a strange Version, not sure if you talk about the iMacros Browser or about iMacros for FF, but for both it would be some fairly old Version..., but OK, you are on FF...)

Short Answer is No, I don't think it's possible, checking all possible Cases seems indeed like the way to me, with '!ERRORIGNORE' and a short '!TIMEOUT_STEP' (=0)...

But depending of what Info you have from the start to run your Script and how generic your Script needs to be, there are a few things to investigate:
- Using the Full HTML Recording Mode, you can identify some Other Attribute(s) to use instead of the 'TXT' Attribute...
- Same idea using the EVENT Mode.
- You could use the Relative Positioning to first tag first some other HTML Element very close to the Link you want to extract...
- You could use a Wildcard to narrow your Extraction to only 2 Statements, by handling "Mortgage" and "mortgage" together with "TXT=*ortgage".
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
steve69a
Posts: 7
Joined: Sat Jan 03, 2015 5:35 pm

Re: IMacros TAG Case-Insensitive

Post by steve69a » Mon Jan 05, 2015 3:50 pm

Hi,

Thanks for your response!

I have changed the way it works a little, by looking for specific elements and grabbing the text no matter what it is. I then check the lcase value to see if it has the words I need.

This only works for some pages, as there are some with different html on each page.

So it works only some of the time, I was hoping there would be an easy solution for CaSe InSenSitIve.

Thanks for your help!

-Steve
chivracq
Posts: 8308
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IMacros TAG Case-Insensitive

Post by chivracq » Mon Jan 05, 2015 4:29 pm

steve69a wrote:So it works only some of the time, I was hoping there would be an easy solution for CaSe InSenSitIve.
That's what I meant with "depending on how generic your Script needs to be."... iMacros always relies heavily on the HTML Structure of Pages...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
Posts: 8308
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: IMacros TAG Case-Insensitive

Post by chivracq » Fri Apr 19, 2019 3:18 am

Hum funny, @steve69a, I see you checking the Forum (now and a few others times I think, in the last few days, so I guess you'll probably come up with a new Thread soon, ah-ah...!), and I had a look at your previous Threads, and hum, about this current Thread, I had exactly the Case yesterday that I needed to make a Script with the 'TXT' Attribute for a 'TAG' Statement being Case-insensitive, (playing some stupid Easter Game with (hidden) Eggs to discover, and I was "afraid" that just one 'TAG' Statement wouldn't work for "Egg"/"egg"/"EGG", so I did some mini-bit of Testing to check how I was going to tackle that... :?

But hum, I quickly came to the "interesting" Conclusion that the 'TXT' ATTR is already Case-insensitive, which was a good News for me in that Case, and I didn't need to implement some "custom-made" Solution, which would have been a little bit more complex..., no real big deal as I already had a few Solutions in mind, but that saved me a bit of time and energy, ah-ah...! :D

OK, your Thread is now about 4 years old, and the Version I am using now (and did my Tests with yesterday) is v8.8.2 for FF (+ Pale Moon v26.3.3 (=FF47), Win10_x64) which is also some pretty old Version (in April 2019, current Version is now v10.0.2, previous "main" Versions were v9.0.3 + v8.9.7 (still the most stable and most Functional Version, but only works until FF56, or on PM27/28)), but that would mean that the Case Sensitivity Functionality had already changed between your (v8.0.2 for FF) Version and mine (v8.8.2). Interesting Fact I would think, ah-ah...! :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply