Help check if button exists... if/else

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
Post Reply
huuhoang2018
Posts: 2
Joined: Fri Jun 25, 2021 4:12 pm

Help check if button exists... if/else

Post by huuhoang2018 » Sat Jul 17, 2021 3:44 pm

Hello,

I am trying to write a simple script to do a search, check if a node exists or not . by imacros
TAG POS=1 TYPE=SPAN ATTR=TXT:I<SP>have<SP>an<SP>email<SP>account


If yes then click on it and execute the next scripts
If not then run OK1.iim



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

Re: Help check if button exists... if/else

Post by chivracq » Sat Jul 17, 2021 4:16 pm

huuhoang2018 wrote:
Sat Jul 17, 2021 3:44 pm
Hello,

I am trying to write a simple script to do a search, check if a node exists or not . by imacros

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:I<SP>have<SP>an<SP>email<SP>account

If yes then click on it and execute the next scripts
If not then run OK1.iim


Thanks

CIM...! :mrgreen: (Read my Sig..., and the Forum Rules on what (Tech) Info to include when you open a Thread... :idea: )

And hum..., I'm not sure I understand your Scenario "exactly", as you mention "button" <> "node" but I only see a 'SPAN' Element in the 1 Line Script you've posted, so your Scenario is a bit "vague" to me..., could you give more Explanation/Details, maybe with a "longer" Script and the URL for your Site...?

>>>

And Threads/Scenarios involving a "check if exists"/Search Functionality/Mechanism usually belong to the 'Data Extraction' Sub-Forum, where I'll possibly move your Thread to, as you'll probably need the 'EXTRACT' Mechanism...
And you'll find related/similar Threads in that Sub-Forum also... :idea:
(But the 'General' Sub-Forum is always OK to select for you to open your Thread(s) if you are a bit "unsure"...)
- (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...
huuhoang2018
Posts: 2
Joined: Fri Jun 25, 2021 4:12 pm

Re: Help check if button exists... if/else

Post by huuhoang2018 » Sun Jul 18, 2021 10:25 am

chivracq wrote:
Sat Jul 17, 2021 4:16 pm
huuhoang2018 wrote:
Sat Jul 17, 2021 3:44 pm
Hello,

I am trying to write a simple script to do a search, check if a node exists or not . by imacros

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:I<SP>have<SP>an<SP>email<SP>account

If yes then click on it and execute the next scripts
If not then run OK1.iim


Thanks

CIM...! :mrgreen: (Read my Sig..., and the Forum Rules on what (Tech) Info to include when you open a Thread... :idea: )

And hum..., I'm not sure I understand your Scenario "exactly", as you mention "button" <> "node" but I only see a 'SPAN' Element in the 1 Line Script you've posted, so your Scenario is a bit "vague" to me..., could you give more Explanation/Details, maybe with a "longer" Script and the URL for your Site...?

>>>

And Threads/Scenarios involving a "check if exists"/Search Functionality/Mechanism usually belong to the 'Data Extraction' Sub-Forum, where I'll possibly move your Thread to, as you'll probably need the 'EXTRACT' Mechanism...
And you'll find related/similar Threads in that Sub-Forum also... :idea:
(But the 'General' Sub-Forum is always OK to select for you to open your Thread(s) if you are a bit "unsure"...)
i am trying to use useragent for firefox ( mobile and PC )
So there are always 2 options for me:
If

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:I<SP>have<SP>an<SP>email<SP>account
I want to enter the mouse on it and continue the next action

Opposite

I want to run OK1.iim

Sorry because My EN is not good hêhee
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help check if button exists... if/else

Post by chivracq » Mon Jul 19, 2021 1:05 am

huuhoang2018 wrote:
Sun Jul 18, 2021 10:25 am
i am trying to use useragent for firefox ( mobile and PC )
So there are always 2 options for me:
If

Code: Select all

TAG POS=1 TYPE=SPAN ATTR=TXT:I<SP>have<SP>an<SP>email<SP>account
I want to enter the mouse on it and continue the next action

Opposite

I want to run OK1.iim

Sorry because My EN is not good hêhee

Hum, OK, but I don't really read or follow up until you comply with "CIM"... :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...
Post Reply