xxxxxxxxxx
// Start by going to a web page first, like this:
I.goTo("https://store.liverpoolfc.com/")
I.click("Accept All Cookies")
I.click("LFC Womens 22/23")
I.wait(5)
//Choose a size and
UI.context(".product-add-form", ()=>{
I.click("14")
})
I.click("Add to Bag")
I.click("Proceed to Checkout")
I.wait(5)
//Fill In needed details
I.fill("Email Address", "[email protected]")
I.select("Country/Region", "United Kingdom")
I.wait(5)
I.fill("First Name", "Samantha")
I.fill("Last Name", "Smith")
I.fill("Street Address", "A")
I.click("Selborne Mansions")
I.fill("Phone", "7400 123348")
I.click("Standard Delivery")
I.click("Proceed To Payment")
I.wait(5)
//Choose Payment and fill details
I.click("Credit/Debit Card")
I.wait(3)
UI.context("//*[@id='flex-cc-number']//iframe", ()=>{
I.fill("Credit Card Number", "4242 4242 4242 4242")
})
I.select("Expiration Date", "12 - December")
I.select("Expiry Year", "2029")
UI.context("//*[@id='flex-cc-cvn']//iframe", ()=>{
I.fill("Card Verification Number", "123")
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 43s (55s)
1.
[start of test]
2.
I go to "https://store.liverpoolfc.com/"
3.0s
3.
I click "Accept All Cookies"
4.
I click "LFC Womens 22/23"
5.
I wait for 5s
5.0s
6.
I click "14"
0.3s
7.
I click "Add to Bag"
8.
I click "Proceed to Checkout"
9.
I wait for 5s
5.0s
11.
I select "Country/Region: United Kingdom"
0.8s
12.
I wait for 5s
5.0s
13.
I fill "First Name": "Samantha"
2.1s
14.
I fill "Last Name": "Smith"
1.7s
15.
I fill "Street Address": "A"
1.4s
16.
I click "Selborne Mansions"
17.
I fill "Phone": "7400 123348"
2.5s
18.
I click "Standard Delivery"
19.
I click "Proceed To Payment"
20.
I wait for 5s
5.0s
21.
I click "Credit/Debit Card"
22.
I wait for 3s
3.0s
23.
I fill "Credit Card Number": "4242 4242 4242 4242"
1.8s
24.
I select "Expiration Date: 12 - December"
2.2s
25.
I select "Expiry Year: 2029"
1.8s
26.
I fill "Card Verification Number": "123"
1.7s
27.
I click "Place Order"
28.
I wait for 5s
5.0s
29.
I see "Transaction has been declined"
3.8s
30.
[end of test]