xxxxxxxxxx
17
 
1
// Loading product hunt, and letting all async assets load
2
I.goTo("https://www.producthunt.com/posts/uilicious-snippet")
3
I.see("Uilicious Snippet");
4
โ€‹
5
// Lets grab the title, after waiting for all async requests
6
I.wait(5);
7
let title = UI.execute(()=>{ return document.title })
8
TEST.log.info("I see page title is \"" + title + "\"");
9
โ€‹
10
// Asset that title shows current product
11
if(title.startsWith("Uilicious Snippet")){
12
    TEST.log.pass("The page title is correct");
13
}else{
14
    TEST.log.fail("The page title is wrong. Fix it @producthunt");
15
}
16
โ€‹
17
โ€‹
Test
1280 x 960
27 Oct 2018, 11:19 AM
Uilicious Snippet - Free testing platform to replicate & share website bugs ๐Ÿž | Product Hunt
FAILED. 0 of 1 errors
17s (9s)
1.
I go to "https://www.producthunt.com/posts/uilicious-snippet" 2.6s
2.
I see "Uilicious Snippet" 0.3s
3.
I wait for 5s 5.6s
4.
Execute Javascript
5.
I see page title is "BugHerd - The world's simplest bug tracker, just point and click | Product Hunt"
6.
The page title is wrong. Fix it @producthunt