Help writing a scripting for Nike.com

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
KiEni
Posts: 14
Joined: Sat Sep 13, 2014 9:25 pm

Help writing a scripting for Nike.com

Post by KiEni » Tue Oct 21, 2014 2:48 am

I'l trying to write a script for Nike, but I'm having a lot of trouble. When I try to tag an element the size table it would I guess "activate" the table it doesn't sense that I'm tagging. Is there any suggestion of what I should do? I'm pretty new to this btw.
Here's my script:

TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-size-container<SP>exp-pdp-dropdown-container<SP>nsg-form--drop-down<SP>is-selected
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%nsg-form--drop-down--label<SP>nsg-grad--light-grey<SP>nsg-form--drop-down<SP>exp-pdp-size-dropdown<SP>exp-pdp-dropdown<SP>selectBox-dropdown<SP>selectBox-open<SP>selectBox-menuShowing
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-size-dropdown-container<SP>nsg-form--drop-down--option-container<SP>selectBox-options<SP>nsg-form--drop-down<SP>exp-pdp-size-dropdown<SP>exp-pdp-dropdown<SP>selectBox-dropdown-menu
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-quantity-container<SP>exp-pdp-dropdown-container<SP>nsg-form--drop-down
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%display:<SP>block;
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help writing a scripting for Nike.com

Post by chivracq » Wed Oct 22, 2014 9:04 am

KiEni wrote:I'l trying to write a script for Nike, but I'm having a lot of trouble. When I try to tag an element the size table it would I guess "activate" the table it doesn't sense that I'm tagging. Is there any suggestion of what I should do? I'm pretty new to this btw.
Here's my script:

TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-size-container<SP>exp-pdp-dropdown-container<SP>nsg-form--drop-down<SP>is-selected
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%nsg-form--drop-down--label<SP>nsg-grad--light-grey<SP>nsg-form--drop-down<SP>exp-pdp-size-dropdown<SP>exp-pdp-dropdown<SP>selectBox-dropdown<SP>selectBox-open<SP>selectBox-menuShowing
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-size-dropdown-container<SP>nsg-form--drop-down--option-container<SP>selectBox-options<SP>nsg-form--drop-down<SP>exp-pdp-size-dropdown<SP>exp-pdp-dropdown<SP>selectBox-dropdown-menu
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%exp-pdp-quantity-container<SP>exp-pdp-dropdown-container<SP>nsg-form--drop-down
TAG POS=1 TYPE=A ATTR=TXT:SIZE CONTENT=%display:<SP>block;
CIM...! :mrgreen:

I don't understand your Problem without the URL to the Page... (and Steps to reproduce...)
- (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...
Cybes
Posts: 31
Joined: Tue Oct 06, 2009 12:06 am

Re: Help writing a scripting for Nike.com

Post by Cybes » Wed Oct 22, 2014 1:47 pm

There are some pretty obvious errors here without even knowing the page.

- You're using what appears to be a DOM-related address for a page element / element states yet putting that in the CONTENT attribute (not the ATTR attribute)
- CONTENT in relation to the A (Link) tag should be a link label
- If you want to trigger view states / events then you can include the link label with the A tag but the ATTR will assist you with doing that, but as it's likely JS driven, even using standard commands (and not the Experimental) ones will likely run into issues or become more complex than it need be
- At a guess some of the DOM elements you're referring to at the start of CONTENT are likely sitting within a DIV or some other tag (or the DOM hierarchy is not being fully referenced), or isn't using an appropriate relative reference in relation to another tag. Likewise if you're only using a partial reference to a DOM element (such as a link, a paragraph of text, a submit button, a radio button, etc) you can use * wildcard so that it matches all instances of that DOM element that contains a name matching the text there

The simplest solution for you will likely be found by putting the Record feature into Experimental mode (Manage->Settings), and then re-recording these steps i'm guessing.
Post Reply