Use command SEARCH SOURCE from an iframe

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
Post Reply
Ervella
Posts: 9
Joined: Thu May 03, 2018 7:56 pm

Use command SEARCH SOURCE from an iframe

Post by Ervella » Fri Jun 22, 2018 7:06 pm

FCIM:
iMacros V 10.00.2738
S.O. W7
Chrome V 67.0.3396.87


Greetings!
Well, I'm developing a new VBS script and I need to check some strings in the source code of a site (I'm using the SEARCH SOURCE command), however, when I execute the script, iMacros can't find strings that are inside an iframe. For frames, I know that exists the command FRAME NAME= ... Then, I need something similar, to indicate the location of strings.
PS.: I've looking in the iMacros forum and googling it, but I didn't found nothing that specific. I only found examples using EXTRACT, but i don't know if it works like SEARCH SOURCE...

Thanks in advance.

Ervella
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Use command SEARCH SOURCE from an iframe

Post by chivracq » Fri Jun 22, 2018 8:05 pm

Ervella wrote:FCIM:
iMacros V 10.00.2738
S.O. W7
Chrome V 67.0.3396.87


Greetings!
Well, I'm developing a new VBS script and I need to check some strings in the source code of a site (I'm using the SEARCH SOURCE command), however, when I execute the script, iMacros can't find strings that are inside an iframe. For frames, I know that exists the command FRAME NAME= ... Then, I need something similar, to indicate the location of strings.
PS.: I've looking in the iMacros forum and googling it, but I didn't found nothing that specific. I only found examples using EXTRACT, but i don't know if it works like SEARCH SOURCE...

Thanks in advance.

Ervella
I don't think indeed the 'SEARCH' Command will be able to search inside Frames, or you first need to extract/identify its direct URL and to open that Frame only, in a 2nd Tab for example...

Or indeed using 'EXTRACT', you can do some 'EXTRACT=HTM' (or '=TXT') on the 'BODY' in the Frame or some 'DIV' at some high Level in the Frame, and using 'EVAL()' (or from your '.vbs' main Script), you run your own Search on the Extract.

(I never use the 'SEARCH' Command myself, I prefer to use 'EVAL()' on the 'Extract' with the JS 'split()' Command (rather than 'match()'), and the Length of the Array returned by 'split()' tells me if my String/Object/whatever is found, and how many times...)
- (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...
Ervella
Posts: 9
Joined: Thu May 03, 2018 7:56 pm

Re: Use command SEARCH SOURCE from an iframe

Post by Ervella » Wed Jun 27, 2018 6:15 pm

That worked! Thanks a lot.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Use command SEARCH SOURCE from an iframe

Post by chivracq » Wed Jun 27, 2018 6:24 pm

Ervella wrote:That worked! Thanks a lot.
Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:
- (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...
Ervella
Posts: 9
Joined: Thu May 03, 2018 7:56 pm

Re: Use command SEARCH SOURCE from an iframe

Post by Ervella » Mon Jul 02, 2018 1:01 am

Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:
Well... Yeah...
I opened the URL of iframe in a second tab annnnnnd used SEARCH on it's source code. That was enough to the code context!
As I said before, many thanks!!

Kind regards,
Ervella
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Use command SEARCH SOURCE from an iframe

Post by chivracq » Mon Jul 02, 2018 1:34 am

Ervella wrote:
Hum, OK..., "That worked!" is a bit as vague as "It doesn't work...", I mentioned several different ways/methods, you could mention which one(s) you tried/chose and even share your Script to show how you implemented it... Other Users with a similar Qt/Case might be interested to know how you implemented it... :idea:
Well... Yeah...
I opened the URL of iframe in a second tab annnnnnd used SEARCH on it's source code. That was enough to the code context!
As I said before, many thanks!!

Kind regards,
Ervella
OK, the first Method I mentioned then...:
I don't think indeed the 'SEARCH' Command will be able to search inside Frames, or you first need to extract/identify its direct URL and to open that Frame only, in a 2nd Tab for example...
Good, Thanks for the Feedback... 8)
- (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