Current time: 01-22-2021, 04:50 PM 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-14-2016, 05:34 PM
Post: #5
RE: Unable to fill a checkout form using Webpage scripts
That's a really hairy script.

Why do you need four navigations? Does each navigation set some state for the subsequent page? If so, could you replicate the state by setting cookies instead? If not, remove the navigations.

What exactly are you trying to measure? Even though the script isn't working, the intention seems to be to record all network activity from home page through the checkout page, with all user interactions in between. WebPageTest can probably do this if you really wanted, but I doubt that's your intention. You are probably looking for results that show you the performance of the final checkout step and/or possibly each intermediate step along the way. In either case, you really need to refactor this script to focus on one thing at a time. Having a few smaller scripts that perform discrete tests is much easier to manage not to mention analyze. It also makes debugging a lot easier as opposed to a monolithic script.

Finally, you have some syntax errors/mistakes.
- logData is enabled by default, so setting it to 1 is a no-op. Do you mean to disable it and then re-enable later?
- try to limit your script to one clickAndWait. In my experience, this command is the last thing before re-enabling logData so you can measure the effect of clicking.
- you should really only need a single navigate command. If you think you need more, break apart your test into multiple smaller tests.
-
Code:
clickAndWait    class=button add
Is "add" another class on the button? The script is whitespace delimited, so it's probably ignored if not erroring out. clickAndWait takes one argument, key=value pair. This happens again with the start-checkout button.
- execAndWait can take any arbitrary JS code. If you're having difficulty with the WPT commands, convert them into JS code and just execAndWait a long chain of ; delimeted JS statements. For example:

Code:
execAndWait foo(); bar(); baz();
Visit this user's website 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 - rviscomi - 02-14-2016 05:34 PM

Forum Jump:


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