Hi,
I have new at Watir and though I have only been using it for about 3 or 4 
hours, I am very impressed. It looks very promising.
Anyway. I am trying to create an automated test to place an order on a 
e-commerce website.  I would say I am about 80% done.
There are 3 problems I have encountered so far and I can't figure out the 
answers:

I am using the website www.proflowers.com as a test site.

1) My script has a line to enter a product number in the search field on 
top (in the homepage):
browser.text_field(:value => " Keyword / Item #").set "30046508"

Problem is I can't get the script to click on the "Go" button to perform 
the search, I am guessing I have the element wrong. I was using:
browser.img(:src => 
"http://a1128.g.akamai.net/7/1128/497/0001/origin.prvd.com/siteimages/PIR100206_XmasTest_Search_v3_go.gif";).click

but that doesn't work.


2) On the product page (
http://products.proflowers.com/flowers/100-Blooms-of-Spring-30046508?ref=CatalogPID&q=30046508&trackingpgroup=pid)
 
my script has an action to click on the calendar:
browser.img(:src => 
"https://a248.e.akamai.net/7/248/497/0001/origin.prvd.com/Siteimages/icon_Calendar_DeliveryTime.gif";).click

A calendar overlay pops up. I want the script to be able to select a 
delivery date on the calendar that is 8 days from today. I just can't this 
to work.
I tried: browser.div(:id => 
"productDetailBody_deliveryCalendar_calendarDisplay_ctl05_ctl00_pnlDate").click
but without success


3) Finally once I have confirmed an order, I want the script to grab the 
Order ID displayed on the order confirmation page and write it down in a 
text file.
The order confirmation page looks like this below. I have also copied the 
HTML for this section of the page.

Thank you so much if you can help!!



Thank You – your order is confirmed.
Print Order 
Confirmation<https://orders.proflowers.com/OrderProcess/(S(kqoe0gc1cpq5qhb00eyzcz5v))/OrderConfirmedPrint.aspx?ref=CatalogPID&trackingpgroup=pid&pid=30046508&op=new&deliverydate=4%2f11%2f2013&flexShown=False&ShowGiftOptions=true&quantity=1&scAddItem=true&flexChosen=False&deliveryon=True&cobrand=pfc&selectedrelationshipID=653664&ssid=73&sidb=4zkpr3pwotsyquswo22xiqlm&LoadProductsFromSessionStore=true>
Your Order Confirmation ID is: *MTXHWA1JAEPT*
You will receive a confirmation email at:  *[email protected]*  shortly. 


<div class="OrderSummary" id="OrderSummary">
   <div class="OrderSummaryHead PeekABooBugFix">
   Thank You&nbsp;–&nbsp;your order is confirmed. 
   </div>
   <div class="OrderSummaryBody PeekABooBugFix">            
   <div id="ctl00_OrderProcessPageBody_ctl01_pnPrintSingleProd" 
class="OrderDetailsPrintIcon">
   <a 
href="/OrderProcess/(S(kqoe0gc1cpq5qhb00eyzcz5v))/OrderConfirmedPrint.aspx?ref=CatalogPID&amp;trackingpgroup=pid&amp;pid=30046508&amp;op=new&amp;deliverydate=4%2f11%2f2013&amp;flexShown=False&amp;ShowGiftOptions=true&amp;quantity=1&amp;scAddItem=true&amp;flexChosen=False&amp;deliveryon=True&amp;cobrand=pfc&amp;selectedrelationshipID=653664&amp;ssid=73&amp;sidb=4zkpr3pwotsyquswo22xiqlm&amp;LoadProductsFromSessionStore=true"
 
target="_blank">Print Order Confirmation</a>
   </div>
   <div id="LogOut" class="OrderDetailsLogout">
   </div>
   Your Order Confirmation ID is:&nbsp;<strong>*<span 
id="ctl00_OrderProcessPageBody_ctl01_lbOrderID" 
class="orderConfirmationID">MTXHWA1JAEPT</span>*</strong><br>
   You will receive a confirmation email at:&nbsp;             
   <strong><span id="ctl00_OrderProcessPageBody_ctl01_lbEmailAddress" 
class="orderConfirmationEmail">[email protected]</span></strong>
   &nbsp;shortly.             
   <br>
   <div style="position:absolute; height:12px;"><div 
class="facebookLikeContainerOrderConfirmed"><div id="FBLikePF"><fb:like 
layout="button_count" data-send="false" 
href="http://www.facebook.com/Proflowers"; ref="fblike_pf_order_confirm" 
width="200" show_faces="false" data-action="like" data-size="medium" 
fb-xfbml-state="rendered" class="fb_edge_widget_with_comment 
fb_iframe_widget"><span style="height: 20px; width: 79px;"><iframe 
id="f37ed64094" name="fd0a19d9" scrolling="no" style="border: none; 
overflow: hidden; height: 20px; width: 79px;" title="Like this content on 
Facebook." class="fb_ltr" 
src="https://www.facebook.com/plugins/like.php?api_key=181198931947730&amp;locale=en_US&amp;sdk=joey&amp;ref=fblike_pf_order_confirm&amp;channel_url=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D20%23cb%3Dfe1efb3b8%26origin%3Dhttps%253A%252F%252Forders.proflowers.com%252Ff28d115eb%26domain%3Dorders.proflowers.com%26relation%3Dparent.parent&amp;href=http%3A%2F%2Fwww.facebook.com%2FProflowers&amp;node_type=link&amp;width=200&amp;layout=button_count&amp;colorscheme=light&amp;action=like&amp;show_faces=false&amp;send=false&amp;extended_social_context=false";></iframe></span></fb:like></div></div></div><div
 
class="facebooklikeText">Like us for great deals on future orders</div>     
                                                                        
   </div>
</div>



-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to