Help: can't flag YES an unnamed checkbox in a table

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
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
DanTGS
Posts: 3
Joined: Mon Jun 11, 2018 10:31 pm

Help: can't flag YES an unnamed checkbox in a table

Post by DanTGS » Mon Jun 11, 2018 11:02 pm

Hello, thanks for your help. I read a lot of entries here on table element checking, but nothing I could find could help me tag the checkbox in this table element.

I'm using
[*]iMacros Browser
[*]V12.0.501.6698
[*]IBM Machine
[*]Windows10


I'm trying to tickoff the Checkbox for PayPal on the following Link:
https://boardgamegeek.com/geekmarket/sell
checkbox.jpg

Used to be that simply using this line of code worked (see full script further below)
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
but it no longer works.


It's a classic checkbox in a table, but can't figure out a way to click it to YES.
tableelementcheckbox.JPG
Any help you can provide would be greatly appreciated. Spent a few hours trying what I read on tagging a table element checkbox, but couldn't figure it out.

My current script using a data file for most fields, but for the PAYPAL it is just a YES value


TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE C:\Users\danie\Downloads\BGG_MARKET01.csv
SET !DATASOURCE_COLUMNS 5
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=https://boardgamegeek.com/geekmarket/br ... id={{!COL1}}
TAG POS=1 TYPE=A ATTR=TXT:Sell<SP>a<SP>Copy
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:currency CONTENT=%USD
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:currency CONTENT=%USD
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:price CONTENT={{!COL2}}
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:condition CONTENT=%new
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:inventorytype CONTENT=%limited
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:quantity CONTENT={{!COL3}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:notes CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:itemlocation CONTENT=%United<SP>States
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:shiplocation CONTENT=%worldwide
TAG POS=1 TYPE=BUTTON FORM=NAME:NoFormName ATTR=TXT:Submit


And again, this used to work - I'm inferring the site updated their pages slightly.

Thanks in advance for your help,

Dan
Last edited by DanTGS on Mon Jun 11, 2018 11:29 pm, edited 1 time in total.
chivracq
Posts: 8525
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help: can't flag YES an unnamed checkbox in a table elem

Post by chivracq » Mon Jun 11, 2018 11:12 pm

DanTGS wrote:Hello, thanks for your help. I read a lot of entries here on table element checking, but nothing I could find could help me tag the checkbox in this table element.

I'm trying to tickoff the Checkbox for PayPal on the following Link:
https://boardgamegeek.com/geekmarket/sell

Used to be that simply using worked

Code: Select all

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
[/i][/b]
but it no longer works.


It's a classic checkbox in a table (see page source BELOW and element inspection ATTACHED IMAGE).

Code: Select all

<div class="form-group" ng-class="{ 'has-error':errors.paymentmethod }">
	<label class="col-sm-2 control-label" for="paymentmethod">Payments</label>

	<div class="col-sm-10">
		<p class="help-block">Select all the payment methods you will accept.</p>
		<table class="table">
			<tr>
								<td width="50%">
					<input type="checkbox"
							 ng-model="product.paymentmethod.paypal"
							 ng-true-value="1"
							 ng-false-value="0"/>&nbsp;PayPal
				</td>....
CIM...! :mrgreen: (Read my Sig...)

Hum, Login required, I can't have a look at the Page directly...

"Used to be that simply using worked"...
=> If anything changed on the Page, simply try re-recording your Action to see what might have changed...

- Try clicking on the Label, and then keeping only the Statement for the Label, that's often enough for a CB to work...

- Try using Relative Positioning...

- And otherwise, upload an HTML Saveas of the Page (zipped) to your Thread if you don't come out by yourself... (or provide some (Test) Login...)

- Oh...!, and you can try using the 'EVENT' Mode as well, depending on what Browser/iMacros Version you are using...

>>>

Oh...!, big Edit-Action while I was typing my Reply..., OK..., ignore the "CIM" part then now... :wink:
DanTGS wrote:Hello, thanks for your help. I read a lot of entries here on table element checking, but nothing I could find could help me tag the checkbox in this table element.

I'm using

Code: Select all

[*]iMacros Browser 
[*]V12.0.501.6698 
[*]IBM Machine
[*]Windows10

I'm trying to tickoff the Checkbox for PayPal on the following Link:
https://boardgamegeek.com/geekmarket/sell
checkbox.jpg

Used to be that simply using this line of code worked (see full script further below)

Code: Select all

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
[/i][/b]
but it no longer works.


It's a classic checkbox in a table, but can't figure out a way to click it to YES.
tableelementcheckbox.JPG
Any help you can provide would be greatly appreciated. Spent a few hours trying what I read on tagging a table element checkbox, but couldn't figure it out.

My current script using a data file for most fields, but for the PAYPAL it is just a YES value


Code: Select all

TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE C:\Users\danie\Downloads\BGG_MARKET01.csv
SET !DATASOURCE_COLUMNS 5
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=https://boardgamegeek.com/geekmarket/browse?objecttype=thing&objectid={{!COL1}}
TAG POS=1 TYPE=A ATTR=TXT:Sell<SP>a<SP>Copy
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:currency CONTENT=%USD
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:currency CONTENT=%USD
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:price CONTENT={{!COL2}}
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:condition CONTENT=%new
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:inventorytype CONTENT=%limited
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:quantity CONTENT={{!COL3}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:notes CONTENT={{!COL4}}
[b]TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES[/b]
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:itemlocation CONTENT=%United<SP>States
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:shiplocation CONTENT=%worldwide
TAG POS=1 TYPE=BUTTON FORM=NAME:NoFormName ATTR=TXT:Submit
[/i]

And again, this used to work - I'm inferring the site updated their pages slightly.

Thanks in advance for your help,

Dan
... => See if any of my previous Suggs helps already... :idea:

EDIT:
Hum..., and as you may notice, your Thread Title is a little bit too long (gets truncated by 4 Chars in Replies), you can maybe remove the "Help" part at the beginning, the "element" term at the end is much more important than "Help" (for other Users searching the Forum), all Threads on the Forum are about "Help"... :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 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...
DanTGS
Posts: 3
Joined: Mon Jun 11, 2018 10:31 pm

Re: Help: can't flag YES an unnamed checkbox in a table elem

Post by DanTGS » Mon Jun 11, 2018 11:29 pm

Hi Chivracq,

[*]tried rerecording to capture any new formatting on the new page. Experimented with wild cards and naming.

Apologies I didn't understand the terms - Not sure what following mean:
[*]try clicking on the Label, and then keeping only the Statement for the Label, that's often enough for a CB to work...
[*]try using Relative Positioning...

Have uploaded an HTML of the page zipped
Sell Item _ GeekMarket.zip
(9.4 KiB) Downloaded 38 times
Trimmed the title of this item to remove the word 'element'. :)

and thank you very much for your help and such a quick response!

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

Re: Help: can't flag YES an unnamed checkbox in a table

Post by chivracq » Tue Jun 12, 2018 12:11 am

DanTGS wrote:Hi Chivracq,

[*]tried rerecording to capture any new formatting on the new page. Experimented with wild cards and naming.

Apologies I didn't understand the terms - Not sure what following mean:
[*]try clicking on the Label, and then keeping only the Statement for the Label, that's often enough for a CB to work...
[*]try using Relative Positioning...

Have uploaded an HTML of the page zipped
Sell Item _ GeekMarket.zip
Trimmed the title of this item to remove the word 'element'. :)

and thank you very much for your help and such a quick response!

Dan
OK, for Thread Title, is good enough...

HTML Saveas, OK, CSS not included, so the Layout is a bit screwed I guess, and I get a lot of "{{errors.condition}}" etc due to Data Validation not taking place because of some missing Background JS Script(s) I guess..., but hum, your original 'TAG' Statement to select the "PayPal" 'CB' works fine for me:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/DanTGS/Sell%20Item%20_%20GeekMarket/Sell%20Item%20_%20GeekMarket.html

'TAG POS=1 TYPE=LABEL FORM=NAME:NoFormName ATTR=TXT:Payments
'TAG POS=1 TYPE=P ATTR=TXT:Select<SP>all<SP>the<SP>payment<SP>methods<SP>you<SP>will*
'TAG POS=1 TYPE=TD ATTR=TXT:PayPal
'>
'Works:
TAG POS=1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)

What I meant by "clicking on the Label", but hum, it's a 'TD' Element indeed, and not a 'LABEL' Element, is the following, that might work for you...:
(Doesn't work for me...)

Code: Select all

TAG POS=1 TYPE=TD ATTR=TXT:PayPal
=> That might automatically select the corresponding 'CB'...

And the following one works as well for me, using Double Relative Positioning on the Label as Anchor:

Code: Select all

SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=TD ATTR=TXT:PayPal
TAG POS=R-1 TYPE=* ATTR=* EXTRACT=TXT
TAG POS=R1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
(Need to use "Double R-Positioning" as the 'CB' is inside the 'TD' and we first need to get outside of the 'TD' for iMacros to be able to "see" the 'CB' inside it again...)

Oh...!, and this one works as well for me:

Code: Select all

TAG POS=1 TYPE=TD ATTR=TXT:PayPal
TAG POS=R-1 TYPE=* ATTR=*
TAG POS=R1 TYPE=INPUT:CHECKBOX ATTR=* CONTENT=YES
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 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...
DanTGS
Posts: 3
Joined: Mon Jun 11, 2018 10:31 pm

Re: Help: can't flag YES an unnamed checkbox in a table

Post by DanTGS » Tue Jun 12, 2018 1:27 am

Thanks Very Much Chivracq!

Relative positioning worked for me!
TAG POS=R1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES

I wasn't aware you could anchor a tag in reverse.

Thanks again,

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

Re: Help: can't flag YES an unnamed checkbox in a table

Post by chivracq » Tue Jun 12, 2018 1:39 am

DanTGS wrote:Thanks Very Much Chivracq!

Relative positioning worked for me!

Code: Select all

TAG POS=R1 TYPE=INPUT:CHECKBOX FORM=NAME:NoFormName ATTR=* CONTENT=YES
[/b][/i]

I wasn't aware you could anchor a tag in reverse.

Thanks again,

Dan
OK, good to hear..., and glad i could help... :D

And yep, R-Positioning works in both Directions, it's documented in the Wiki, I think..., and for Double R-Positioning (that "Technique" is "mine" btw), it usually doesn't really matter if you do ('R-1' + 'R1') or ('R1' + 'R-1') unless the first (fake) 'R-Pos' might "hit" some clickable Element, then you'll prefer the other Order...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 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...
petersh
Posts: 1
Joined: Tue May 29, 2018 3:34 am

Re: Help: can't flag YES an unnamed checkbox in a table

Post by petersh » Sun Jun 24, 2018 10:08 am

I am also using win 10 and face the same issue with YES.
But now I I can do it
Thanks for the guiide, Lazada New Coupon Update Muarehon
Post Reply