xxxxxxxxxx
I.click("I agree to the Terms & Conditions", -20, 5) //Used an offset click to click on the check box
//Navigate to site
I.goTo("https://shop.landrover.com/")
//Accept Cookies and choose shipping destination
I.click("Allow All")
I.click("Save")
I.click("Allow All")
//Choose what to buy and
I.hoverOn("Travel & Outdoors")
I.click("Luggage & Bags")
I.click("Weekender Bag")
I.click("Add To Bag")
I.wait(5)
I.click("Checkout")
//Fill In needed details
I.fill("Email Address", "[email protected]")
I.fill("First Name", "John")
I.fill("Last Name", "Kent")
I.fill("City", "Sample City")
I.fill("Post Code", "EC1A 2BN")
I.wait(5)
I.click("Holborn Viaduct")
I.click("1st Translation Co")
I.wait(5)
I.see("1st Translation Co Ltd")
I.fill("Phone Number", "1234567890")
I.click("Continue To Secure Payment")
//Choose Payment Method and fill in details
I.click("Pay By Card")
UI.context("iframe[title='Secure card number input frame']", ()=>{
I.fill("Credit or debit card number", "4242 4242 4242 4242") //Used the Aria Label of the field
})
UI.context("iframe[title='Secure expiration date input frame']", ()=>{
I.fill("Credit or debit card expiration date", "12/29") //Used the Aria Label of the field
})
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 23s (28s)
1.
[start of test]
2.
I go to "https://shop.landrover.com/"
4.0s
3.
I click "Allow All"
4.
I click "Save"
5.
I click "Allow All"
6.
I hover on "Travel & Outdoors"
0.5s
7.
I click "Luggage & Bags"
8.
I click "Weekender Bag"
9.
I click "Add To Bag"
10.
I wait for 5s
5.0s
11.
I click "Checkout"
13.
I fill "First Name": "John"
0.5s
14.
I fill "Last Name": "Kent"
0.5s
15.
I fill "City": "Sample City"
0.8s
16.
I fill "Post Code": "EC1A 2BN"
0.8s
17.
I wait for 5s
5.0s
18.
I click "Holborn Viaduct"
19.
I click "1st Translation Co"
20.
I wait for 5s
5.0s
21.
I see "1st Translation Co Ltd"
0.1s
22.
I fill "Phone Number": "1234567890"
0.8s
23.
I click "Continue To Secure Payment"
24.
I click "Pay By Card"
25.
I fill "Credit or debit card number": "4242 4242 4242 4242"
1.4s
26.
I fill "Credit or debit card expiration date": "12/29"
0.9s
27.
I fill "Credit or debit card CVC/CVV": "123"
0.9s
28.
I click "Place Order"
29.
I see "This is a required field."
0.1s
30.
I click (-20, 5) from "I agree to the Terms & Conditions"
31.
I click "Place Order"
32.
I see "Card was declined"
0.1s
33.
[end of test]