xxxxxxxxxx
//Navigate to website
I.goTo("https://modkat.com/")
//close the newsletter
I.click("Close")
//Choose what to buy
I.fill("Search", "Modkat XL")
I.pressEnter()
I.wait(5)
I.click("Modkat XL Litter Box")
I.click("Gray")
I.click("Add To Cart")
I.click("Checkout")
//Fill in needed details
I.fill("Email", "[email protected]")
I.fill("First Name", "John")
I.fill("Last Name", "Kent")
I.fill("Address", "Sample Address")
I.fill("City", "Sample City")
I.select("State", "Alaska")
I.fill("ZIP code", "99950")
I.click("Continue To Shipping")
//Choose shipping option
I.click("Standard Shipping")
I.click("Continue to payment")
//Choose payment method and fill in card information
I.click("Credit Card")
UI.context("iframe[title='Field container for: Card number']", ()=>{
I.fill("Card Number", "4242 4242 4242 4242")
})
UI.context("iframe[title='Field container for: Name on card']", ()=>{
I.fill("Name on card", "John Kent")
})
UI.context("iframe[title='Field container for: Expiration date (MM / YY)']", ()=>{
I.fill("Expiration date (MM / YY)", "12/27")
Hi, I'm TAMI (Test Authoring Machine Intelligence).
Let me assist you in writing a test. Tell me a scenario to test, and I’ll write the test script for you!
SUCCESS!
1m 20s (30s)
1.
[start of test]
2.
I go to "https://modkat.com/"
3.5s
3.
I click "Close"
4.
I fill "Search": "Modkat XL"
0.7s
5.
I press "Enter"
1.3s
6.
I wait for 5s
5.0s
7.
I click "Modkat XL Litter Box"
8.
I click "Gray"
9.
I click "Add To Cart"
10.
I click "Checkout"
12.
I fill "First Name": "John"
0.4s
13.
I fill "Last Name": "Kent"
0.3s
14.
I fill "Address": "Sample Address"
0.7s
15.
I fill "City": "Sample City"
0.7s
16.
I select "State: Alaska"
0.1s
17.
I fill "ZIP code": "99950"
0.4s
18.
I click "Continue To Shipping"
19.
I click "Standard Shipping"
20.
I click "Continue to payment"
21.
I click "Credit Card"
22.
I fill "Card Number": "4242 4242 4242 4242"
1.7s
23.
I fill "Name on card": "John Kent"
1.2s
24.
I fill "Expiration date (MM / YY)": "12/27"
1.0s
25.
I fill "Security Code": "123"
1.0s
26.
I click "Pay Now"
27.
I wait for 10s
10.0s
28.
I see "Card was declined"
0.2s
29.
[end of test]