Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CSRafaelAlves/191456fb145944736844d280221b82b4 to your computer and use it in GitHub Desktop.
Save CSRafaelAlves/191456fb145944736844d280221b82b4 to your computer and use it in GitHub Desktop.
require File.join(File.dirname(__FILE__), 'modules', 'helper')
class ComprarScreen < AndroidScreenBase
include SystemHelper
# Identificador da tela
trait(:trait) { "* id:'#{layout_name}'" }
# Declare todos os elementos da tela
element(:layout_name) { 'insert_layout_identificator' }
# element(:button) { 'insert_button_identificator' }
# Declare todas as acoes da tela
# action(:touch_button) {
# touch("* id:'#{button}'")
# }
def click_notification_matched_by_full_text(timeout, *strings)
puts puts "Chamando click_notification_matched_by_full_text"
h = { 'timeout' => timeout.to_s, 'action.click' => 'true' }
strings.map.with_index { |v, i| h["notification.full.#{i}"] = v if v }
handle_notification(h)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment