continuing -- bncollege/casperjs issue

瀏覽次數:7 次
跳到第一則未讀訊息

bruce

未讀,
2017年6月11日 中午12:28:342017/6/11
收件者:casp...@googlegroups.com
Hi.

Continuing casperjs/bncollege issue for the >>waitfor << not working correctly.

The issue appears to be occuring regarding the waitfor not working.
I'm not sure why the correct page isn't generated from the underlying
obfuscated code. The content that gets generated when the waitfor
fails isn't the correct content.

Again, if you insert the url in a browser ,you'll see the
actual/correct content.

Any thoughts/comments are welcome..



The usecase/test script and the resulting output is listed.

casperjs /crawl_tmp/bnbook_track.js --ignore-ssl-errors=true
--ssl-protocol=any
--url1="http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=<?xml
version='1.0' encoding='UTF-8'?><textbookorder><courses><course
dept='SPCH' num='1311' sect='27156' term='A17' /><course dept='SPCH'
num='1311' sect='27150' term='A17' /><course dept='SPCH' num='1311'
sect='27148' term='A17' /><course dept='SPCH' num='1311' sect='27154'
term='A17' /><course dept='SPCH' num='1315' sect='27162' term='A17'
/></courses></textbookorder>"
--trackID="5db85b72-4ea3-11e7-a82b-86c67f188148" --ua='Mozilla/5.0
(Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/41.0.2228.0 Safari/537.36'
[info] [phantom] Starting...
dsdsdsd
[info] [phantom] Running suite: 6 steps
[debug] [phantom] opening url: http://www.bncollege.com/, HTTP GET
[debug] [phantom] Navigation requested: url=http://www.bncollege.com/,
type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "http://www.bncollege.com/"
[debug] [phantom] Successfully injected Casper client-side utilities
[debug] [phantom] start page is loaded
[debug] [phantom] opening url:
http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
HTTP GET
[debug] [phantom] Navigation requested:
url=http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to
"http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step _step 4/6
http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=<?xml
version='1.0' encoding='UTF-8'?><textbookorder><courses><course
dept='SPCH' num='1311' sect='27156' term='A17' /><course dept='SPCH'
num='1311' sect='27150' term='A17' /><course dept='SPCH' num='1311'
sect='27148' term='A17' /><course dept='SPCH' num='1311' sect='27154'
term='A17' /><course dept='SPCH' num='1315' sect='27162' term='A17'
/></courses></textbookorder> (HTTP 200)
[info] [phantom] Step _step 4/6: done in 2138ms.
[debug] [phantom] Navigation requested:
url=http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
type=FormSubmitted, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to
"http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E"
[debug] [phantom] Successfully injected Casper client-side utilities
[warning] [phantom] Casper.waitFor() timeout
oops
[debug] [phantom] opening url:
http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
HTTP GET
[debug] [phantom] Navigation requested:
url=http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
type=Other, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to
"http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step _step 6/6
http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=<?xml
version='1.0' encoding='UTF-8'?><textbookorder><courses><course
dept='SPCH' num='1311' sect='27156' term='A17' /><course dept='SPCH'
num='1311' sect='27150' term='A17' /><course dept='SPCH' num='1311'
sect='27148' term='A17' /><course dept='SPCH' num='1311' sect='27154'
term='A17' /><course dept='SPCH' num='1315' sect='27162' term='A17'
/></courses></textbookorder> (HTTP 200)
[info] [phantom] Step _step 6/6: done in 122624ms.
[debug] [phantom] Navigation requested:
url=http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E,
type=FormSubmitted, willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to
"http://austin.bncollege.com/webapp/wcs/stores/servlet/TBListView?&catalogId=10001&storeId=65166&langId=-1&termMapping=Y&courseXml=%3C?xml%20version='1.0'%20encoding='UTF-8'?%3E%3Ctextbookorder%3E%3Ccourses%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27156'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27150'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27148'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1311'%20sect='27154'%20term='A17'%20/%3E%3Ccourse%20dept='SPCH'%20num='1315'%20sect='27162'%20term='A17'%20/%3E%3C/courses%3E%3C/textbookorder%3E"
[debug] [phantom] Successfully injected Casper client-side utilities
[warning] [phantom] Casper.waitFor() timeout
oops22
[info] [phantom] Done 6 steps in 242650ms
<html><head></head><body><form name="courseListForm"
id="courseListForm" method="post"> <h1>Your Course Materials</h1>
<script language="JavaScript" type="text/javascript"> //<![CDATA[
sIFRcall('h1'); //]]> </script> <div class="subDesc"> <p>Please choose
the purchase option for books.</p> </div> <input type="hidden"
name="mcEnabled" value="N"> <input type="hidden" name="catalogId"
value="10001"> <input type="hidden" name="savedListAdded"
value="true"> <input type="hidden" name="clearAll" value=""> <input
type="hidden" name="viewName" value="TBWizardView"> <input
type="hidden" name="postLogonURL" value="TextBookSaveCourseListCmd">
<input type="hidden" name="URL" value=""> <input type="hidden"
name="redirectView" value="TBWizardView"> <input type="hidden"
name="ldTextbooks" value="Y"> <input type="hidden" name="prevPage"
value="TextbookList"> <input type="hidden" name="storeId"
value="33552"> <input type="hidden" name="eBookOnlyValues"
id="eBookOnlyValues" value=""> <div class="mLeft10"> </div> <input
type="hidden" name="saveCourseListView" value="BNCBLogonForm"> <div
class="floatLeft width45"><img
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/spacer.gif"
width="0" height="0" alt="" border="0"></div><br> <input type="hidden"
id="removeCourseCounter" name="removeCourseCounter" value="0"> <div
class="sectionHeading"> <span class="remove"><a title="Remove Course"
href="#" onclick="removeCourseList(2,0)">Remove Course</a></span>
</div> <div> <input type="hidden" name="preorder_1" value="0"> <input
type="hidden" name="notregistered_1" value="0"> <input type="hidden"
name="field2_1" value="1"> <input type="hidden" name="section_1"
value="48714519"> <input type="hidden" name="isFree_1" id="isFree_1"
value=""> <input type="hidden" name="print_catentry_1"
id="print_catentry_1" value=""> <div class="tbListHolding"> <div
class="sectionProHeading"> <ul> <li><input type="checkbox"
class="morph" title="add to cart" name="addtocart_1" id="addtocart_1"
value="true" checked="Checked" onclick="updateCheckboxes('1')"></li>
<li><a href="ALIF_BAAINTROTO_ARABICWDVD/BNCB_TextbookDetailView?catalogId=10001&amp;
storeId=33552&amp;langId=-1&amp;productId=500001161574&amp;
sectionId=48714519&amp;partNumber=MBS_987003&amp;item=Y&amp;
displayStoreId=33552" title="ALIF BAA:INTRO.TO ARABIC...-W/DVD">ALIF
BAA:INTRO.TO ARABIC...-W/DVD</a></li> <li class="required"> REQUIRED
<input type="hidden" name="isRequired_1" value="1"> </li> </ul> </div>
<div class="sectionHolding spacingLine"> <table> <tbody><tr> <td
class="sectionImage" rowspan="2"> <a
href="ALIF_BAAINTROTO_ARABICWDVD/BNCB_TextbookDetailView?catalogId=10001&amp;
storeId=33552&amp;langId=-1&amp;productId=500001161574&amp;
sectionId=48714519&amp;partNumber=MBS_987003&amp;item=Y&amp;
displayStoreId=33552" title="ALIF BAA:INTRO.TO ARABIC...-W/DVD"> <img
src="/wcsstore/ExtendedSitesCatalogAssetStore/images/textbookImages/16000/THUMBIMAGE_73823612.JPG"
border="0" alt="ALIF BAA:INTRO.TO ARABIC...-W/DVD" title="ALIF
BAA:INTRO.TO ARABIC...-W/DVD"> </a> </td> <td class="sectionDesc"> <ul
class="TBinfo"> <li><span>Author: </span>BRUSTAD</li> <li>
<span>Edition:</span>3RD 10<br> </li> <li>
<span>Publisher:</span>HOPKINS F<br> </li> <li> <span>ISBN:</span>
9781589016323 </li> <li> <div id="viewZoomImage_1" style="">
</div></li> <li id="addRentalInfo_1" style="color:#000 !important;
display:block; overflow:hidden; padding-top:10px"> </li> </ul> <div
id="addDigitalInfo_1"> </div> </td> <td class="sectionSelect"> <span
class="purchaseHead">Purchase Option</span> <ul> <li> </li> <li>
<input id="new_1" type="radio" title="Used if available" name="new_1"
value="2" checked="Checked"
onclick="changeTBCatentryId('1','500001161574','1') "> <label
for="new_1"> <span> Used <a title="if available" name="available">if
available</a></span> $37.45 </label> </li> <li> <input name="new_1"
type="radio" title="New" value="1"
onclick="changeTBCatentryId('1','500001161574','1')" id="new_1">
<label for="new_1"><span>New</span> $49.95 </label> </li> <input
type="hidden" name="quantity_1" value="1"> <input type="hidden"
id="catEntryId_1" name="catEntryId_1" value="500001161574"> <input
type="hidden" id="DGBookIdValues_1" name="DGBookIdValues_1" value="">
<input type="hidden" name="sectionss_1" value="48714519"> <input
type="hidden" name="store_1" value="33552"> </ul> </td> </tr>
</tbody></table> </div> </div> <input type="hidden" name="preorder_2"
value="0"> <input type="hidden" name="notregistered_2" value="0">
<input type="hidden" name="field2_2" value="2"> <input type="hidden"
name="section_2" value="48714519"> <input type="hidden"
name="isFree_2" id="isFree_2" value=""> <input type="hidden"
name="print_catentry_2" id="print_catentry_2" value=""> <div
class="tbListHolding"> <div class="sectionProHeading"> <ul> <li><input
type="checkbox" class="morph" title="add to cart" name="addtocart_2"
id="addtocart_2" value="true" checked="Checked"
onclick="updateCheckboxes('2') "></li> <li><a
href="ALKITAABBEGINARABICPT1WDVD/BNCB_TextbookDetailView?catalogId=10001&amp;
storeId=33552&amp;langId=-1&amp;productId=500001866150&amp;
sectionId=48714519&amp;partNumber=MBS_1099208&amp;item=Y&amp;
displayStoreId=33552" title="AL-KITAAB:...BEGIN.ARABIC,PT.1 -W/DVD">
AL-KITAAB:...BEGIN.ARABIC,PT.1 -W/DVD</a></li> <li class="required">
REQUIRED <input type="hidden" name="isRequired_2" value="1"> </li>
</ul> </div> <div class="sectionHolding spacingLine"> <table>
<tbody><tr> <td class="sectionImage" rowspan="2"> <a
href="ALKITAABBEGINARABICPT1WDVD/BNCB_TextbookDetailView?catalogId=10001&amp;
storeId=33552&amp;langId=-1&amp;productId=500001866150&amp;
sectionId=48714519&amp;partNumber=MBS_1099208&amp;item=Y&amp;
displayStoreId=33552" title="AL-KITAAB:...BEGIN.ARABIC,PT.1 -W/DVD">
<img src="/wcsstore/ExtendedSitesCatalogAssetStore/images/textbookImages/17000/THUMBIMAGE_98008876.JPG"
border="0" alt="AL-KITAAB:...BEGIN.ARABIC,PT.1 -W/DVD"
title="AL-KITAAB:...BEGIN.ARABIC,PT.1 -W/DVD"> </a> </td> <td
class="sectionDesc"> <ul class="TBinfo"> <li><span>Author:
</span>BRUSTAD</li> <li> <span>Edition:</span>3RD 11<br> </li> <li>
<span>Publisher:</span> HOPKINS F<br> </li> <li> <span>ISBN:</span>
9781589017368 </li> <li> <div id="viewZoomImage_2" style="">
</div></li> <li id="addRentalInfo_2" style="color:#000 !important;
display:block; overflow:hidden; padding-top:10px"> </li> </ul> <div
id="addDigitalInfo_2"> </div> </td> <td class="sectionSelect"> <span
class="purchaseHead">Purchase Option</span> <ul> <li> </li> <li>
<input id="new_2" type="radio" title="Used if available" name="new_2"
value="2" checked="Checked" onclick="changeTBCatentryId('2',
'500001866150','1') "> <label for="new_2"><span> Used <a title="if
available" name="available">if available</a></span> $52.45 </label>
</li> <li> <input name="new_2" type="radio" title="New" value="1"
onclick="changeTBCatentryId('2','500001866150','1')" id="new_2">
<label for="new_2"><span>New</span> $69.95 </label> </li> <input
type="hidden" name="quantity_2" value="1"> <input type="hidden"
id="catEntryId_2" name="catEntryId_2" value="500001866150"> <input
type="hidden" id="DGBookIdValues_2" name="DGBookIdValues_2" value="">
<input type="hidden" name="sectionss_2" value="48714519"> <input
type="hidden" name="store_2" value="33552"> </ul> </td> </tr>
</tbody></table> </div> </div> </div> <!-- <div
class="clear15px"></div> AS check if required at end --> <br
class="clearAll"> <!--Rel 4.7 GM XSells on Text Book Listing Page |
Start --> <div class="sectionHeading"> <!-- Start - JSP File name:
product/TextBookXsell.jsp --> <!-- Start - JSP File Name:
ErrorMessageSetup.jspf --> <!-- End - JSP File Name:
ErrorMessageSetup.jspf --> <link rel="stylesheet" type="text/css"
media="all" href="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/css/global.css">
<script type="text/javascript"> if(typeof sIFR == "function" &&
!sIFR.UA.bIsIEMac){ sIFR.setup(); }; // combine palette color value
with "#" before passing to flash; var headerColor = '#'+''; function
sIFRcall(header) { if(typeof sIFR == "function" && header == "h1"){
sIFR.replaceElement(named({sSelector:"body h1",
sFlashSrc:"http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/javascript/sifr.swf",
sColor:headerColor, sBgColor:"#FFFFFF", sWmode:"transparent",
nPaddingTop:0, nPaddingBottom:0,
sFlashVars:"textalign=left&offsetTop=0"})); }; if(typeof sIFR ==
"function" && header == "h2"){
sIFR.replaceElement(named({sSelector:"body h2",
sFlashSrc:"http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/javascript/sifr.swf",
sColor:headerColor, sBgColor:"#FFFFFF", sWmode:"transparent",
nPaddingTop:0, nPaddingBottom:0,
sFlashVars:"textalign=left&offsetTop=0"})); }; } </script>
<!--Obtaining the flag whether multicampus enabled or not [START]-->
<!--Obtaining the flag whether multicampus enabled or not [END]-->
<link rel="stylesheet" type="text/css" media="all"
href="/webapp/wcs/stores/servlet/ConsumerDirectStorefrontAssetStore/css/BNCB_DynamicCss.jsp?storeId=33552">
<!--<script src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/javascript/sifr.js"
type="text/javascript"></script>--> <script language="JavaScript"
type="text/javascript"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/javascript/colHeightfix.js">
</script> <input title="gmstoreid" type="hidden" name="gmStoreId"
value="33552"> <div class="gmHeading"> May We Suggest </div> <div
class="optAccessories"> <table> <tbody><tr> <td><input title="gm
catentry id_1" type="checkbox" name="gmCatEntryId_1"
value="300000497965" onclick="updateCheckboxes('1')"> <input
title="gmquantity_1" type="hidden" name="gmquantity_1" value="1"></td>
<td class="accImg"><img id="productPic" name="productMainImage"
src="http://static.ibncollege.com/wcsstore/ExtendedSitesCatalogAssetStore/753_75308_99_829438_NI/images/THUMBNAILIMAGE_444398.jpg"
alt="Nookstudy 4Gb" border="0"></td> <td> <strong class="accHeading">
Nookstudy 4Gb</strong> <div>Nook Study 4gb Flash Drive pre-loaded with
NOOK study eTextbook application on drive. The NOOKstudy Flash Drive
also includes NOOKstudy's 50 Survival Tips for studying!</div>
<strong>$19.99</strong> </td> </tr> </tbody></table> </div> <div
class="optAccessories"> <table> <tbody><tr> <td> <input title="gm
catentry id_2" type="checkbox" name="gmCatEntryId_2"
value="300000313010" onclick="updateCheckboxes('2')"> <input
title="gmquantity_2" type="hidden" name="gmquantity_2" value="1"></td>
<td class="accImg"><img id="productPic" name="productMainImage"
src="http://static.ibncollege.com/wcsstore/ExtendedSitesCatalogAssetStore/714_71403_99_125904_NI/images/THUMBNAILIMAGE_349787.jpg"
alt="Texas Instrument 30X Iis Scientific Calculator" border="0"></td>
<td> <strong class="accHeading">Texas Instrument 30X Iis Scientific
Calculator</strong> <div>Calculator with 2 line 11 character display,
basic scientific/trigonometry functions and suitable for algebra,
geometry and statistics</div> <strong>$19.98</strong> </td> </tr>
</tbody></table> </div> <div class="optAccessories"> <table>
<tbody><tr> <td><input title="gm catentry id_3" type="checkbox"
name="gmCatEntryId_3" value="300000499610"
onclick="updateCheckboxes('3')"> <input title="gmquantity_3"
type="hidden" name="gmquantity_3" value="1"></td> <td
class="accImg"><img id="productPic" name="productMainImage"
src="http://static.ibncollege.com/wcsstore/ExtendedSitesCatalogAssetStore/900_90001_1_831312_NI/images/THUMBNAILIMAGE_482300.jpg"
alt="Ohio State Buckeyes Jansport Wasabi Backpack" border="0"></td>
<td> <strong class="accHeading">Ohio State Buckeyes Jansport Wasabi
Backpack</strong> <div>AirCore shoulder straps/ One large main
compartment/ Dedicated side entry compartment fits 15' laptop/ Front
utility pocket with organizer/ Fully padded back panel/Front stash
pocket/ V-loft pocket/ Mesh Water Bottle pocket</div>
<strong>$44.98</strong> </td> </tr> </tbody></table> </div> <input
title="GM count" type="hidden" id="gmCount" name="gmCount" value="3">
</div> <!-- Module End for GM XSells --> <input type="hidden"
name="counter" value="2"> <div id="btns" style="padding-bottom: 0px;
padding-left:10px; overflow:hidden;"> <div class="floatLeft"> <a
title="change course" href="#here"
onclick="javascript:submitChangeCourse()"><img title="change course"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/change_course_btn.gif"
id="changeCourseList" border="0" align="middle" alt="Change"
class="pRight5"> </a> <img alt="Change" border="0"
style="display:none"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/changing.gif"
id="changingCourseList" align="middle" class="pRight5"> <img
alt="Change" border="0" style="display:none"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/change_course_btn.gif"
id="disableChangeCourseList" align="middle" class="pRight5"> </div>
<div class="floatRight"> <a title="Add to Cart" href="#here"><img
id="AddToCartButton" title="add to cart" class="btnBorder"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/addSelectItems.gif"
border="0" alt="Add to Cart" align="middle"
onclick="Add2ShopCart(document.courseListForm,'addtoshopcart',
'donotaddtoshopcart');"></a> <img name="image2" style="display:none"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/submitting.gif"
align="middle" class="btnBorder" border="0" alt="Submitting"
id="donotaddToCartButton"> <img alt="Add to cart" border="0"
style="display:none"
src="http://static.ibncollege.com/wcsstore/ConsumerDirectStorefrontAssetStore/images/addSelectItems.gif"
id="disableAddToCart" align="middle" class="btnBorder"> </div> </div>
<input type="hidden" id="maxCounter" name="maxCounter" value="2">
<script language="JavaScript" type="text/javascript">
updateCheckboxes(1); checkAdditionalInfo(2);
checkDigitalChangeTBCatentryId(); </script> </form></body></html>
[debug] [phantom] Navigation requested: url=about:blank, type=Other,
willNavigate=true, isMainFrame=true
[debug] [phantom] url changed to "about:blank"


the test script bnbook_track.js
cat /crawl_tmp/bnbook_track.js

========================================================
/*
*
* bnbook_track.js: test to generate the term page for the bkstr input
*
* casper.js bnbook_track.js --url1="foo1" --track='zz'
*
* update jun 10/17
* -simply uses the "track" input as a way of tracking the process
in the procTBL
* -the parent app then tracks the uid in a inproc file..
* -the external app then blows away the matching pid/process based
on the amount of time running
* -a rough approach to ensuring the casperjs/bnbook fetch process
runs consistently
*
*
*/

//var ua = casper.cli.get("ua");

var casper = require('casper').create({
verbose: true,
logLevel: 'debug',
waitTimeout: 120000, // new maximum waitTimeout
pageSettings: {
loadImages: false,
javascriptEnabled: true,
}
});

var ua = casper.cli.get("ua");

casper.userAgent(ua);

phantom.timeout=120000;
phantom.stepTimeout=120000;
phantom.cookiesEnabled = true;

var x = require('casper').selectXPath;


var url1 = casper.cli.get("url1");

/*
casper.options.onResourceRequested = function(casper, requestData, request) {
// If any of these strings are found in the requested resource's URL, skip
// this request. These are not required for running tests.
var skip = [
'staticxx.facebook.com',
'googleads.g.doubleclick.net',
'www.facebook.com',
'www.google.com',
'bid.g.doubleclick.net',
'login.dotomi.com',
'www.google.com',
'insight.adsrvr.org',
'cdn.krxd.net'
];

skip.forEach(function(needle) {
if (requestData.url.indexOf(needle) > 0) {
request.abort();
}
})
};
*/


/*
casper.onResourceRequested = function(requestData, request) {
if ((/http:\/\/.+?\.css/gi).test(requestData['url']) ||
requestData.headers['Content-Type'] == 'text/css') {
console.log('The url of the request is matching. Aborting: ' +
requestData['url']);
request.abort();
}
};
*/


u="http://www.bncollege.com"

casper.start(u);
//casper.start();


var processPage = function() {
this.echo(this.page.content).exit();
};

casper.thenOpen(url1).waitForText("Remarketing", processPage,
//casper.thenOpen(url1).waitForSelector(x('//input[@id="remarketingStoreId"]'),
processPage,

function fail() {
console.log("oops");
}
);


var processPagea = function() {
this.echo(this.page.content).exit();
};

casper.thenOpen(url1).waitForText("Remarketing", processPagea,
//casper.thenOpen(url1).waitForSelector(x('//input[@id="remarketingStoreId"]'),
processPage,

function fail() {
console.log("oops22");
}
);


casper.echo("dsdsdsd");

casper.run(function () {
// echo results in some pretty fashion
// this.echo(this.debugPage()).exit();
// fs.write(cookie_file, JSON.stringify(phantom.cookies), 644);
// this.echo("finish").exit();
this.echo(this.page.content).exit();

});
回覆所有人
回覆作者
轉寄
0 則新訊息