         .setValue               activitySelector + ' .comment-input-view', editedPost
         .click                  activitySelector + ' .submit-button'
         .pause                  5000 # wait for image loading
-        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container p', 2000
+        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container p', 20000
         .assert.containsText    activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container p', editedCode
 
     if editWithImage
       browser
         .setValue               activitySelector + ' .comment-input-view', imageText
         .click                  activitySelector + ' .submit-button'
-        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container', 2000
+        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container', 20000
         .refresh()              #in order for the image to resize
-        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container', 5000
+        .waitForElementVisible  activitySelector + ' .comment-container .listview-wrapper .comment-contents .comment-body-container', 20000
 
       browser.getAttribute imageSelector, 'height', (result) ->
         height = result.value

    if editLink
      browser
        .setValue               activitySelector + activityInputSelector, finalLink
        .waitForElementVisible  activitySelector + ' .activity-content-wrapper .edit-widget-wrapper .activity-input-widget .link-embed-box .with-image a[href="https://www.google.com/"]:first-child', 5000
        .click                  activitySelector + ' .done-button'
        .pause                  5000 #for image load
        .assert.containsText    activitySelector + ' .activity-content-wrapper .link-embed-box .title', 'Google'

        .setValue               activitySelector + activityInputSelector, editedPost
        .click                  activitySelector + ' .done-button'
        .pause                  1000 # below element is not found without pause
        .waitForElementVisible  activitySelector + ' .has-markdown code', 20000
        .assert.containsText    activitySelector + ' .has-markdown code', editedCode

    if editImage
