1

Currently i am working in a shopping cart application. User has to navigate to category page and choose the product then add it to the cart.Every vuser should choose the different product for every iteration.

I have added parameters to Category and product. But products have different numbers of images. Some products have ten images some products have one image only.

Here i need your help.. How can i add different numbers of image files in one web-url function?

Product 1

web_url("{Category}", 
        "URL=http://{Server}/{Category}", 
        "TargetFrame=", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=http://{Server}/", 
        "Snapshot=t4.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=/Themes/DefaultClean/Content/images/toggle-gray.png", ENDITEM, 
        LAST); 

Product 2

web_url("{Category}", 
        "URL=http://{Server}/{Category}", 
        "TargetFrame=", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=http://{Server}/", 
        "Snapshot=t26.inf", 
        "Mode=HTML", 
        EXTRARES, 
        "Url=/Themes/DefaultClean/Content/images/toggle-gray.png", ENDITEM, 
        "Url=/Themes/DefaultClean/Content/images/view-grid.png", ENDITEM, 
        "Url=/Themes/DefaultClean/Content/images/view-list.png", ENDITEM, 
        LAST);

Is it possible to create one web_url function where i can add all EXTRARES dynamically so it will download all required image files for the product without hard-coding them ? I have checked Download non html resources in run settings but there is a big difference in body bytes when images are not downloaded.

Enock Prince
  • 141
  • 2
  • 13

1 Answers1

2

Yes, as you are in HTML mode the page will be dynamically parsed for resources. Just comment out the resources present and make sure that you have the appropriate run time settings selected to ensure that static resources are downloaded.

web_url("{Category}", 
        "URL=http://{Server}/{Category}", 
        ... 
        "Mode=HTML", 
        EXTRARES, 
        /*
        "Url=/Themes/DefaultClean/Content/images/toggle-gray.png", ENDITEM, 
        "Url=/Themes/DefaultClean/Content/images/view-grid.png", ENDITEM, 
        "Url=/Themes/DefaultClean/Content/images/view-list.png", ENDITEM, 
        */
        LAST);
James Pulley
  • 5,606
  • 1
  • 14
  • 14
  • Thanks James.. I commented EXTRARES and downloading non html resources. – Enock Prince Jan 09 '18 at 11:45
  • This doesn't look to be working for me. Have ticked "Download non-HTML resources" in the Browser emulation section. Is there logging to turn on to see if resources are being pulled? – EzPaulZ Oct 06 '21 at 22:57
  • Look at the web logs, or turn on full logging on VUGEN for development only – James Pulley Oct 07 '21 at 02:25