Clicking a checkbox that is currently not there...

Discussions and Tech Support related to the iMacros Google Chrome extension.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Clicking a checkbox that is currently not there...

by whyarewehere84 on Thu May 25, 2017 10:17 am

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_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!
whyarewehere84
 
Posts: 3
Joined: Thu May 25, 2017 10:08 am

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

by chivracq on Fri May 26, 2017 8:51 pm

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 6:11 am, edited 3 times in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 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: 5702
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

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

by iimfun on Fri May 26, 2017 11:34 pm

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
iimfun
 
Posts: 201
Joined: Tue Jul 19, 2016 6:06 am

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

by whyarewehere84 on Thu Jun 01, 2017 3: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 3:50 pm, edited 1 time in total.
whyarewehere84
 
Posts: 3
Joined: Thu May 25, 2017 10:08 am

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

by whyarewehere84 on Thu Jun 01, 2017 3: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
whyarewehere84
 
Posts: 3
Joined: Thu May 25, 2017 10:08 am

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

by chivracq on Thu Jun 01, 2017 10:31 pm

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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 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: 5702
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Chrome

Who is online

Users browsing this forum: No registered users and 1 guest

Website Monitoring