Current time: 02-28-2021, 05:31 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to fill a checkout form using Webpage scripts
02-12-2016, 11:16 PM
Post: #4
RE: Unable to fill a checkout form using Webpage scripts
(02-12-2016 06:35 PM)rviscomi Wrote:  Did you make it a private test? I'm unable to see the script, which makes it hard to debug.

The general pattern for this type of test would be something like this:

Code:
logData 0
navigate setup-page.html
setValue id=foo bar
logData 1
navigate test-page.html

Of course, "foo" must be the ID attribute of the input element whose value should be set to "bar". Repeat for each form field.

If you want to try the JS approach with getElementById, make sure you're using it with the exec[AndWait] command and not just writing pure JS in the script block.


This is my script..

//Script that works on Production environments. For other environments tweak the DOM elements.
logdata 1
logErrors 1

//Homepage
navigate http://www.lowes.com

//Localize to store
setValue id=nav-search-input 28117
clickAndWait id=nav-button-store-search

//Category page
navigate http://www.lowes.com/Kitchen/_/N-1z0z3a8/pc

//PL page
navigate http://www.lowes.com/Kitchen-Cabinets/In...Cabinets#!

//PD page
navigate http://www.lowes.com/pd_336272-66150-33+...34938&pl=1

//Select shipping type
clickAndWait id=LD

//Add to cart from PD page
clickAndWait class=button add

//Checkout from Add to cart modal (View cart page)
clickAndWait class=ui-button-text

//Start secure checkout from view cart
//clickAndWait class=btn-shop secure more start-checkout
clickAndWait data-action=login

//Guest checkout
clickAndWait class=btn-shop secure more start-checkout

//Enter shipping information
execAndWait document.getElementsByClassName('ui-input required firstName').value="test"

But using this I was not able to complete the form.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unable to fill a checkout form using Webpage scripts - dhilipvenkatesh - 02-12-2016 11:16 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)