I am trying to make it where every time I visit a nike.com sneaker page, it automatically picks my shoe size, adds it to the cart, and checks out for me. Every time I try to run the script, I keep getting this error
ERROR: Execution of script 'My Fancy New Userscript' failed! selenium is not defined
Here is my script:
// ==UserScript==
// @name My Fancy New Userscript
// @namespace http://*/*
// @version 0.1
// @description enter something useful
// @match http://*/*
// @copyright 2012+, You
// ==/UserScript==
selenium.select("class=selectBox-label", "10"); // this selects size 10
selenium.click("class=add-to-cart nike-button nike-button-orange");
selenium.waitForElement("class=checkout-button nike-button nike-button-orange");
selenium.click("class=checkout-button nike-button nike-button-orange");
Help is very much appreciated, thank you!
Edit:
I just ran it through JSLint, and got this error:
'selenium' was used before it was defined. (Line 1 Character 1) ----> selenium.select("class=selectBox-label", "10"); // this selects size 10