Not getting the right element
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
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
Not getting the right element
iMarcro 8.8.5, Firefox 33, Windows 8.1 64-bit
I'm having a bit of trouble trying to tag the right element. When I run my script I tag the right thing buy when I try to find tag the forms that's related to my element its tags the forms related to the element next to my desire element.
My Script:
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT
TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5
TAG POS=R1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
HTML:
<div id="product-description">
<h2>Hanon x Asics Gel Epirus 'TROPICAL GREEN'</h2> <---Anchor
<p id="product-price">
<span class="product-price" itemprop="price">$130.00</span>
</p>
<form id="product-form-371757621" data-money-format="${{amount}}" method="post" action="/cart/add"> <----- Desire element to be selected
<script>
<script type="text/javascript">
I'm having a bit of trouble trying to tag the right element. When I run my script I tag the right thing buy when I try to find tag the forms that's related to my element its tags the forms related to the element next to my desire element.
My Script:
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT
TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5
TAG POS=R1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
HTML:
<div id="product-description">
<h2>Hanon x Asics Gel Epirus 'TROPICAL GREEN'</h2> <---Anchor
<p id="product-price">
<span class="product-price" itemprop="price">$130.00</span>
</p>
<form id="product-form-371757621" data-money-format="${{amount}}" method="post" action="/cart/add"> <----- Desire element to be selected
<script>
<script type="text/javascript">
Re: Not getting the right element
Can't you post the URL of the Page...?KiEni wrote:iMarcro 8.8.5, Firefox 33, Windows 8.1 64-bit
I'm having a bit of trouble trying to tag the right element. When I run my script I tag the right thing buy when I try to find tag the forms that's related to my element its tags the forms related to the element next to my desire element.
My Script:HTML:Code: Select all
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5 TAG POS=R1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5 TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
<div id="product-description">
<h2>Hanon x Asics Gel Epirus 'TROPICAL GREEN'</h2> <---Anchor
<p id="product-price">
<span class="product-price" itemprop="price">$130.00</span>
</p>
<form id="product-form-371757621" data-money-format="${{amount}}" method="post" action="/cart/add"> <----- Desire element to be selected
<script>
<script type="text/javascript">
But I think that both your Anchor and the Element you want to R-tag after are located within the same Div, so R-Tag will get you out of the Div. You need to use double R-Tag to get back into the Div...
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Not getting the right element
Here is the url: http://www.socialstatuspgh.com/collections/asicschivracq wrote:Can't you post the URL of the Page...?KiEni wrote:iMarcro 8.8.5, Firefox 33, Windows 8.1 64-bit
I'm having a bit of trouble trying to tag the right element. When I run my script I tag the right thing buy when I try to find tag the forms that's related to my element its tags the forms related to the element next to my desire element.
My Script:HTML:Code: Select all
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5 TAG POS=R1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5 TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button WAIT SECONDS=1 TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
<div id="product-description">
<h2>Hanon x Asics Gel Epirus 'TROPICAL GREEN'</h2> <---Anchor
<p id="product-price">
<span class="product-price" itemprop="price">$130.00</span>
</p>
<form id="product-form-371757621" data-money-format="${{amount}}" method="post" action="/cart/add"> <----- Desire element to be selected
<script>
<script type="text/javascript">
But I think that both your Anchor and the Element you want to R-tag after are located within the same Div, so R-Tag will get you out of the Div. You need to use double R-Tag to get back into the Div...
Re: Not getting the right element
Instead of complaining in this other Thread without even referring to this current Thread that I didn't elaborate on Double R-Tag, you should have followed up in this current Thread...KiEni wrote:Here is the url: http://www.socialstatuspgh.com/collections/asics
But anyway..., thanks to the URL, I was able to play with your Page, and the Explanation to your Problem is that you use Relative Positioning (perfect!) but the 'Size' Field is actually a hidden RadioButton for which only the Labels are visible (and can be clicked/selected). When you record selecting a 'Size', you should have noticed that 2 Statements get recorded at once:
Code: Select all
TAG POS=1 TYPE=LABEL FORM=ID:product-form-371757621 ATTR=TXT:9.5
TAG POS=1 TYPE=INPUT:RADIO FORM=ID:product-form-371757081 ATTR=ID:swatch-0-9-5
Code: Select all
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT
'TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5 // (Commented out...)
TAG POS=R1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
Other Solution if you want to keep the Label, but you need to know that the RadioButton comes first in the DOM Hierarchy, so you need to use Negative R-Positioning for the RadioButton after the Label:
Code: Select all
TAG POS=1 TYPE=H2 ATTR=TXT:*TROPICAL*GREEN* Extract=TXT
TAG POS=R1 TYPE=LABEL FORM=ID:product* ATTR=TXT:9.5
TAG POS=R-1 TYPE=INPUT:RADIO FORM=ID:product* ATTR=ID:swatch-0-9-5
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:product* ATTR=NAME:button
WAIT SECONDS=1
TAG POS=1 TYPE=A ATTR=TXT:View<SP>cart
And BTW, Config Info in your Signature for the other Thread(s?) you opened is not a good idea, or only to indicate what is your current Config, as those Threads will become completely confusing in a few weeks/months when you'll have updated iMacros or your Browser as you only have 1 dynamic Signature for the whole Forum and for all your Posts...
(And it's not "iMarcro" but "iMacros"...!)
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Not getting the right element
Sorry it was just bugging me. Why is that having one and the other would cause it to go to a different product? When I say one and the other I'm referring to the R-Tags. And also I notice that for the TROPICAL it would add a size 9 to the cart but with the NIGHTSHADE it added the correct size 9.5. Why is that so? It is not a big deal but I'm just and would like to learn.
Re: Not getting the right element
I think that both your Anchor and the Element you want to R-tag after are located within the same Div, so R-Tag will get you out of the Div. You need to use double R-Tag to get back into the Div...
**SignaturE**