Skip to content

Instantly share code, notes, and snippets.

@DominicGBauer
Last active September 2, 2019 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicGBauer/f0b147146e7c2c7748a852c78a56b2cb to your computer and use it in GitHub Desktop.
Save DominicGBauer/f0b147146e7c2c7748a852c78a56b2cb to your computer and use it in GitHub Desktop.
webdriver example
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