     it 'Should manage to input search text', (done) ->
       searchText = 'kallion kirjasto'
       browser
-        .waitForElementByCss(searchFieldPath, delay)
+        .waitForElementByCss(searchFieldPath, delay, pollFreq)
         .click()
         .type(searchText)
         .should.be.fulfilled


    it 'Should manage to click search button', (done) ->
      browser
        .waitForElementByCss(searchButton, delay)
        .click().should.be.fulfilled
        .should.notify(done)

    it 'Should find item "Kallion kirjasto"', (done) ->
      browser
        .waitForElementByCss(searchResultPath, asserters.textInclude("Kallion kirjasto"), delay)
        .should.be.fulfilled
        .should.notify(done)

    it 'Should not find item "Kallio2n kirjasto"', (done) ->
      browser
        .waitForElementByCss(searchResultPath, asserters.textInclude("Kallio2n kirjasto"), errorDelay)
        .should.be.rejected
        .should.notify(done)

browser = undefined
asserters = undefined

delay = 20000
errorDelay = 1000
pollFreq = 100

baseUrl = 'http://localhost:9001'
pageTitle = 'Pääkaupunkiseudun palvelukartta'
