title: Shopping Online automation
body: <p>I want to create script to online shopping automation for this site.</p>
  
  <p>link to product eg: <a href="http://www.lazada.com.my/remax-otg-micro-to-usb-adapter-pendrive-mouse-reader-ra-otg-forandroid-gold-10498828.html?mp=1&amp;boost=1" rel="nofollow noreferrer">http://www.lazada.com.my/remax-otg-micro-to-usb-adapter-pendrive-mouse-reader-ra-otg-forandroid-gold-10498828.html?mp=1&amp;boost=1</a></p>
  
  <p>with reference from this question (<a href="https://stackoverflow.com/questions/15048223/choosing-and-activating-the-right-controls-on-an-ajax-driven-site">Choosing and activating the right controls on an AJAX-driven site</a>). But as a person who got zero knowledge about JavaScript language, im here seeking help from those who able to help and share their knowledge here. Thank you in advance.</p>
  
  <p>This is what i got so far, and i dont know how to combine them to make it 1 complete script.</p>
  
  <p>Step 1. Add to cart</p>
  
  <p>i.stack.imgur.com/Q7ugu.png</p>
  
  <pre><code>jQuery(function(){
  jQuery('#AddToCart').click();
  </code></pre>
  
  <p>Step 2. Checkout</p>
  
  <p>i.imgur.com/fqFqbEX.png</p>
  
  <pre><code>$(document).ready(function() {
  $(".btn-checkout col submit_btn mtssel-cart-checkout-button").click(function() {
      _gaq.push(['_trackPageview', $(this).attr('https://www.lazada.com.my/checkout/step/index/')]);
  });
  </code></pre>
  
  <p>Step 3. Login 
  Prelogin</p>
  
  <p>Step 4. Shipping</p>
  
  <p>i.imgur.com/0HoZZWL.png</p>
  
  <pre><code>jQuery(function(){
  jQuery('.shipping_btn').click();
  });
  </code></pre>
  
  <p>Step 5. Payment(There's few payment option to be choose from tabs. I'll use paypall.)</p>
  
  <p>i.imgur.com/tBENIEs.png</p>
  
  <pre><code>$(document).ready(function() {
  $("#tabs-Paypal").tabs();
  $('#action').click(function() {
      var selected = $( "#tabs-Paypal" ).tabs({ active: # });
  });
  </code></pre>
  
  <p>(not working)</p>
  
  <p>Step 6. Place order</p>
  
  <p>i.imgur.com/ESXR5Kx.png</p>
  
  <p>note: dummy login (lazada123@stromox.com)(lazada123)</p>
  
  <p>Question: So is it possible to do all the step with 1 click only using javascript? And how to combined all those to make 1 complete script?</p>