xxxxxxxxxxlet username = "death-flew-61"// Go to inboxI.goTo("https://inboxkitten.com/inbox/" + username + "/list")// Wait for some time for the email to arriveI.wait(15) // If you are reusing the same email address to test the same email,// you will get multiple emails with the same subject, which can // make it difficult for the test engine to pick the correct one.// Use I.see at something near the top of the page, to drop a hint// to the test engine to pick the email nears to the top, which// would be the latest email.I.see("@inboxkitten") // Open the mailI.see("Reset your password")I.click("Reset your password")// You need to use UI.context to target within iframes.// - We need to be explicit about targeting iframes// because of the security restrictions in newer browsersUI.context("#message-content" /* the ID of the iframe containing the email body*/, ()=>{ // click on the "reset password" button I.click("Reset password") })// Check that I'm at the "Reset password" pageI.amAt("https://user.uilicious.com/resetPassword?token=wDXFpy1cuuXUVebDtFweE3")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!
31s (21s)
1.
[start of test]
2.
I go to "https://inboxkitten.com/inbox/death-flew-61/list"
1.1s
3.
I wait for 15s
15.1s
4.
I see "@inboxkitten"
0.1s
5.
I see "Reset your password"
6.
I click "Reset your password"
3.3s
7.
I click "Reset password"
1.8s
8.
I am at "https://user.uilicious.com/resetPassword?token=wDXFpy1cuuXUVebDtFweE3"
9.
[end of test]