I hope I am in right places.
Recently I want to test similecookie performance. The test procedure is:
Go to http://www.smileycookie.com
Select from menu “Shop By Price”
Select menu item “$20.00 -$30.00”;
Select Position dropdown and select Sort Product by “Sales Rank”;
Click the first item on the page;
Enter QTY to “3”
Click “ADD TO BASKET”
Click “PROCEED TO CHECKOUT”
I wrote scripts like:
click innerText="$20.00 -$30.00"
//click title=“Travel Mug and Gourmet Sugar Cookie Gift Basket”
//click innerText=“Travel Mug and Gourmet Sugar Cookie Gift Basket”
//Enter QTY to “3”
setValue id=qty 3
//Click “ADD TO BASKET”
click className=“button add-to-cart”
//Click “PROCEED TO CHECKOUT”
clickAndWait title=“Proceed to Checkout”
a) The homepage popups a dialog and block next click event.
b) Though popup is closed manually, the next click and clickAndWait with title/className/innerText seems still not work.
The test browser is FF.
Could anyone help me resolve this issues(a and b). Or correct me if any wrong in my scripts. Thanks
In the sample:
//click className=“button add-to-cart”
execAndWait jQuery(‘input[class~=“add-to-cart”]’).trigger(‘click’) //NEW
The corresponding DOM element is:
I first tested “jQuery(‘input[class~=“add-to-cart”]’).trigger(‘click’)” in Firefox console and it works, but exec(or execAndWait) jQuery(‘input[class~=“add-to-cart”]’).trigger(‘click’) does not trigger click event when it is tested with WPT.
My question is whether jquery or other 3rd JS APIs is supported for exec invocation?