def wait_for_element(element_id, timeout = $testwise_polling_timeout, interval = $testwise_polling_interval)
      start_time = Time.now
      #TODO might not work with Firefox
      until @web_browser.element_by_id(element_id) do
        sleep(interval)
        if (Time.now - start_time) > timeout
          raise RuntimeError, "failed to find element: #{element_id} for max #{timeout}"
        end
      end
    end
def wait_for_element(element_id, timeout = $testwise_polling_timeout, interval = $testwise_polling_interval)
      start_time = Time.now
      #TODO might not work with Firefox
      until @web_browser.element_by_id(element_id) do
        sleep(interval)
        if (Time.now - start_time) > timeout
          raise RuntimeError, "failed to find element: #{element_id} for max #{timeout}"
        end
      end
    end
Wait the element with given id to be present in web page

 Warning: this not working in Firefox, try use wait_util or try instead