Exemplo n.º 1
0
 it('wait for an arbitrary amount of time', async () => {
   var val = false
   setTimeout(() => {
     val = true
   }, 90)
   await ghost.wait(50)
   assert.equal(val, false)
   await ghost.wait(50)
   assert.equal(val, true)
 })
Exemplo n.º 2
0
  it('we can wait for a page', async () => {
    await ghost.open('http://localhost:8888/basic_content.html')

    let myElement = await ghost.findElement('#popupLink')
    await myElement.click()
    await ghost.wait(5000)
    await ghost.waitForPage('form.html')
  })