"OR" function for buttons?

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
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
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

"OR" function for buttons?

Post by questions » Fri Oct 10, 2008 1:39 am

how do make the script click on one button "OR" another button

sometimes the button says

submit

sometimes it says

click here

1) how do i make the script click on either of those two buttons but not any other buttons that my appear?

2) is there an "OR" command?
dharmendra2000
Posts: 214
Joined: Fri Jul 04, 2008 1:28 pm
Location: Ahmedabad
Contact:

Re: "OR" function for buttons?

Post by dharmendra2000 » Fri Oct 10, 2008 4:19 am

It is possible with Java Script, but with provided information it is difficult to answer!
Please give an example, so it would be easy to answer.

Dharmesh Uteshiya
www.dharmesh-uteshiya.co.nr
petrph
Posts: 8
Joined: Thu Jun 26, 2008 6:05 pm

Re: "OR" function for buttons?

Post by petrph » Thu Oct 16, 2008 1:09 pm

It;s no clear what do you mean with : "OR" function for buttons, but here is my example:

SET !ERRORIGNORE YES
SET !TIMEOUT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:searchGoButton
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:mw-searchButton
SET !ERRORIGNORE NO
SET !TIMEOUT 20

It means - when the first button isn't found, the next is used.
It is possible for you?
questions
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

Re: "OR" function for buttons?

Post by questions » Sat Oct 25, 2008 10:35 pm

petrph wrote:It;s no clear what do you mean with : "OR" function for buttons, but here is my example:

SET !ERRORIGNORE YES
SET !TIMEOUT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:searchGoButton
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:mw-searchButton
SET !ERRORIGNORE NO
SET !TIMEOUT 20

It means - when the first button isn't found, the next is used.
It is possible for you?
i mean exactly what i said

do one thing OR the other

thats what i did (your example), thanks!
simonlow
Posts: 3
Joined: Fri Feb 18, 2011 2:26 pm

Re: "OR" function for buttons?

Post by simonlow » Tue Feb 22, 2011 2:13 pm

Hello,
I am trying the similar thing. I am writing a script to test that if there is now button FUND NOW start script from the beginning. A page I am testing has either a fund now button or an error is displayed if the user has not passed the validation. I need the script to start from the beginning if the button is not found.

How do I say if button is not found start script from the beginning?
sailor
Posts: 6
Joined: Fri Mar 07, 2014 5:58 am

Re: "OR" function for buttons?

Post by sailor » Sat Mar 08, 2014 2:57 pm

what about if the button is made of picture without text?
petrph wrote:It;s no clear what do you mean with : "OR" function for buttons, but here is my example:

SET !ERRORIGNORE YES
SET !TIMEOUT
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:searchGoButton
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:searchform ATTR=ID:mw-searchButton
SET !ERRORIGNORE NO
SET !TIMEOUT 20

It means - when the first button isn't found, the next is used.
It is possible for you?
chivracq
Posts: 8771
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: "OR" function for buttons?

Post by chivracq » Sun Mar 09, 2014 9:41 am

@Sailor:
Doesn't make a difference, the 2 Picture_Buttons will always have different Names/ID's/URL's to identify them uniquely...

For more "advanced" Techniques to force some Conditional Behaviour in pure .iim Macros, see the following Thread where I explained a few Methods that I use:
Decision Making using iMacros/Possible Workarounds
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply