Last active
January 30, 2018 14:26
-
-
Save conanak99/7900e0fdd2b113dee21fd9cf292ad729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test('Install app', async() => { | |
expect.assertions(1); | |
// Tìm và click vào link | |
const appDownloadLink = await page.$x('//*[@id="topActionDownload"]'); | |
await appDownloadLink[0].click(); | |
await page.waitForNavigation(); | |
// Tìm element trên menu, lấy innerText của element đó | |
const breadCrumbHandle = await page.$x('/html/body/header/footer/div[2]/div[1]/ul/li[2]/span'); | |
const text = await page.evaluate(element => element.innerText, breadCrumbHandle[0]); | |
// Check nội dung element đó có chữ App Mobile tại Lazada | |
expect(text).toContain('App Mobile tại Lazada'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment