Clicking a checkbox that is currently not there...

Discussions and Tech Support specific to the iMacros for Chrome extension.
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
whyarewehere84
Posts: 3
Joined: Thu May 25, 2017 5:08 pm

Clicking a checkbox that is currently not there...

Post by whyarewehere84 » Thu May 25, 2017 5:17 pm

I am brand new to this, and don't know what I'm doing. I'd appreciate a little help.

Basically, I'm trying to write something that will refresh a page, click a checkbox (once it appears), and then click submit. Rinse and repeat.

The problem is that I don't know how to write a code to click a checkbox that is currently not on the page itself.

I'm using this on a website so that I can try to purchase a house (an affordable housing program--gotta love my teacher salary!), so I can't have anyone else log in to experiment. I promise I'm not using this for nefarious purposes!

Here's what I have so far:

URL GOTO=https://interwapp01.loudoun.gov/DFS_App ... tings.aspx
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings

I need this checkbox click to go between lines 2 and 3. That way, when it shows up, it'll select it and then use the next line of code to then submit. Alternatively, I can have the keystroke sequence "tab, tab, tab, space" (but it seems "tab" cannot be used in this program?).

I super appreciate your help!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Clicking a checkbox that is currently not there...

Post by chivracq » Sat May 27, 2017 3:51 am

whyarewehere84 wrote:I am brand new to this, and don't know what I'm doing. I'd appreciate a little help.

Basically, I'm trying to write something that will refresh a page, click a checkbox (once it appears), and then click submit. Rinse and repeat.

The problem is that I don't know how to write a code to click a checkbox that is currently not on the page itself.

I'm using this on a website so that I can try to purchase a house (an affordable housing program--gotta love my teacher salary!), so I can't have anyone else log in to experiment. I promise I'm not using this for nefarious purposes!

Here's what I have so far:

Code: Select all

URL GOTO=https://interwapp01.loudoun.gov/DFS_AppsPublic/ADUNewPublic/listings.aspx
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings
I need this checkbox click to go between lines 2 and 3. That way, when it shows up, it'll select it and then use the next line of code to then submit. Alternatively, I can have the keystroke sequence "tab, tab, tab, space" (but it seems "tab" cannot be used in this program?).

I super appreciate your help!
CIM...! :mrgreen:
(Read my Sig about mentioning your FCI when you open a Thread, many Commands are not implemented for all Browser/Versions... :idea: )
=> For me to do any "Digging", your Case sounds a bit "interesting" though, ah-ah...!, but FCI not mentioned, I don't react normally, sorry...!

Hum, and try to select the correct Sub-Forum next time you open a Thread, the 'iMacros for CR' Sub-Forum is meant for Scripts that fail in CR only but work in other Browsers, your Thread doesn't sound like it has anything specific to only CR... (Correct Sub-Forum would have been the 'General' one, but no need to duplicate now...)
Last edited by chivracq on Sat May 27, 2017 1:11 pm, edited 3 times in total.
- (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...
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Clicking a checkbox that is currently not there...

Post by iimfun » Sat May 27, 2017 6:34 am

whyarewehere84 wrote:The problem is that I don't know how to write a code to click a checkbox that is currently not on the page itself.
If I understood you right, the macro may look like

Code: Select all

URL GOTO=https://interwapp01.loudoun.gov/DFS_AppsPublic/ADUNewPublic/listings.aspx
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings

SET !TIMEOUT_STEP 99999
' here is your code to click a checkbox after it appears
SET !TIMEOUT_STEP 6

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings
whyarewehere84
Posts: 3
Joined: Thu May 25, 2017 5:08 pm

Re: Clicking a checkbox that is currently not there...

Post by whyarewehere84 » Thu Jun 01, 2017 10:47 pm

chivracq wrote: CIM...! :mrgreen:
(Read my Sig about mentioning your FCI when you open a Thread, many Commands are not implemented for all Browser/Versions... :idea: )
=> For me to do any "Digging", your Case sounds a bit "interesting" though, ah-ah...!, but FCI not mentioned, I don't react normally, sorry...!

Hum, and try to select the correct Sub-Forum next time you open a Thread, the 'iMacros for CR' Sub-Forum is meant for Scripts that fail in CR only but work in other Browsers, your Thread doesn't sound like it has anything specific to only CR... (Correct Sub-Forum would have been the 'General' one, but no need to duplicate now...)
Okay, I think I understand! So FCI...I'm using iMacros and Google Chrome. Also: VERSION BUILD=844 RECORDER=CR. I can use any browser, though chrome is my favorite.

And I'm sorry I posted it in the wrong forum! Like I said...very new to this. :? I appreciate you kindly telling me, rather than heckling me!
Last edited by whyarewehere84 on Thu Jun 01, 2017 10:50 pm, edited 1 time in total.
whyarewehere84
Posts: 3
Joined: Thu May 25, 2017 5:08 pm

Re: Clicking a checkbox that is currently not there...

Post by whyarewehere84 » Thu Jun 01, 2017 10:50 pm

iimfun wrote:
whyarewehere84 wrote:The problem is that I don't know how to write a code to click a checkbox that is currently not on the page itself.
If I understood you right, the macro may look like

Code: Select all

URL GOTO=https://interwapp01.loudoun.gov/DFS_AppsPublic/ADUNewPublic/listings.aspx
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings

SET !TIMEOUT_STEP 99999
' here is your code to click a checkbox after it appears
SET !TIMEOUT_STEP 6

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings

Yes, that's right! But I just need to know what code to put in that spot. Or are you saying that the:

SET !TIMEOUT_STEP 99999
SET !TIMEOUT_STEP 6

is the actual code needed? If so, you're literally my hero! :D
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Clicking a checkbox that is currently not there...

Post by chivracq » Fri Jun 02, 2017 5:31 am

whyarewehere84 wrote:Okay, I think I understand! So FCI...I'm using iMacros and Google Chrome. Also: VERSION BUILD=844 RECORDER=CR. I can use any browser, though chrome is my favorite.

And I'm sorry I posted it in the wrong forum! Like I said...very new to this. :? I appreciate you kindly telling me, rather than heckling me!
Hum..., yeah..., you understood about 33% of "CIM"/"FCI", Browser Version and OS are still missing...! :roll:
I normally don't read and certainly don't answer if those 3 Versions about your Config/Environment are missing...
=> iMacros for CR v8.4.4, CR57...?, OS...?
whyarewehere84 wrote:
iimfun wrote:
whyarewehere84 wrote:The problem is that I don't know how to write a code to click a checkbox that is currently not on the page itself.
If I understood you right, the macro may look like

Code: Select all

URL GOTO=https://interwapp01.loudoun.gov/DFS_AppsPublic/ADUNewPublic/listings.aspx
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings

SET !TIMEOUT_STEP 99999
' here is your code to click a checkbox after it appears
SET !TIMEOUT_STEP 6

TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:form1 ATTR=ID:btnSubmit
TAG POS=1 TYPE=A ATTR=ID:ADUNewPublicFooter1_lbListings
Yes, that's right! But I just need to know what code to put in that spot. Or are you saying that the:

Code: Select all

SET !TIMEOUT_STEP 99999
SET !TIMEOUT_STEP 6
is the actual code needed? If so, you're literally my hero! :D
Tja...!, you need to record once clicking on that Checkbox, you must have seen it, otherwise how do you know about it, ah-ah...!?

The "SET !TIMEOUT_STEP 99999" Statement from @iimfun means that your Macro will wait for 99999 Seconds (=27.8 Hours!) for the next 'TAG' HTML Element to appear, your Checkbox thus, but this Code will work if your Checkbox will appear "spontaneously" without requiring any Reload/Refresh from you... But I had a look at the Site and I don't have the "Feeling" that anything will "appear" spontaneously without a Refresh so I am afraid this Solution will not work, as if you loop your Script, it will loop once every 28h, oops...!

If you are looking for some "generic" Click Statement on a Checkbox, here is one:

Code: Select all

TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=* CONTENT=YES
This would click on the first CB present on any Web-Page... (Well, "any"..., if the CB is not in a Frame...)
- (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