Last active
September 2, 2019 11:54
-
-
Save DominicGBauer/f0b147146e7c2c7748a852c78a56b2cb to your computer and use it in GitHub Desktop.
webdriver example
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
it('should slide through gallery', async () => { | |
const gallery = await browser.$('.open-gallery-button') | |
await gallery.click() | |
await delay(2000) | |
const rightSwipe = await browser.$('.right-arrow') | |
await rightSwipe.click() | |
await delay(2000) | |
const paragraph = await browser.$$( | |
'div:nth-of-type(3) .caption-drawer .post-content p' | |
) | |
const paragraphText = await paragraph[2].getText() | |
expect(paragraphText).toEqual( | |
"With the hotel's location on a marina, you can enjoy the freshest seafood in town." | |
) | |
const closeGallery = await browser.$('.vodal-close') | |
closeGallery.click() | |
await delay(5000) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment