<commit_before># coding: utf-8

module AppiumGesture
  # find element with accessibility_id strategy
  def tap_name(element_name)
    wait { find_element(accessibility_id: element_name) }.click
  end

  # find element with xpath strategy
  def tap_xpath(element_xpath)
    wait { find_element(xpath: element_xpath) }.click
  end

  # find element with id strategy
  def tap_id(element_id)
    wait { find_element(id: element_id) }.click
  end

  # find element with xpath strategy
  # in addition, the method search element with including words
  def tap_ele_include(element_name)
    wait { find(element_name) }.click
  end

  def tap_text(text_name)
    wait { text(text_name) }.click
  end

  def back_page
    back
  end
end<commit_msg>add error message if failed to wait<commit_after># coding: utf-8

module AppiumGesture
  # find element with accessibility_id strategy
  def tap_name(element_name)
    wait(message: "failed to tap #{element_name} with timeout") {
      find_element(accessibility_id: element_name) }.click  end

  # find element with xpath strategy
  def tap_xpath(element_xpath)
    wait(message: "failed to tap #{element_xpath} with timeout") {
      find_element(xpath: element_xpath) }.click
  end

  # find element with id strategy
  def tap_id(element_id)
    wait(message: "failed to tap #{element_id} with timeout") {
      find_element(id: element_id) }.click
  end

  # find element with xpath strategy
  # in addition, the method search element with including words
  def tap_ele_include(element_name)
    wait(message: "failed to tap #{element_name} with timeout") {
      find(element_name) }.click
  end

  def tap_text(text_name)
    wait(message: "failed to tap #{text_name} with timeout") {
      text(text_name) }.click
  end

  def back_page
    back
  end
end
{'fraction_non_alphanumeric': 0.07769145394006659, 'fraction_numerical': 0.0011098779134295228, 'mean_word_length': 3.8994565217391304, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3206658', 'n_tokens_mistral': 586, 'n_tokens_neox': 571, 'n_words': 179}