Module: ADBScreenShot

Defined in:
lib/tabbyx/utils/adb_screenshot.rb

Class Method Summary collapse

Class Method Details

.get_sub_image(up_left_x, up_left_y, bottom_right_x, bottom_right_y) ⇒ Object



16
17
18
# File 'lib/tabbyx/utils/adb_screenshot.rb', line 16

def self.get_sub_image(up_left_x,up_left_y,bottom_right_x,bottom_right_y)
  #TODO
end

.take_screenshot(image_name) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/tabbyx/utils/adb_screenshot.rb', line 8

def self.take_screenshot(image_name)
  temp_path = File.absolute_path(SCREENSHOT_TEMP)+"/"
  print "TABBYX: screenshot folder", temp_path, "\n"
  Shell.adb_shell("screencap -p /data/local/tmp/" << image_name << ".png")
  Shell.adb("pull /data/local/tmp/" << image_name << ".png " << temp_path)
  Shell.adb_shell("rm /data/local/tmp/*.png")
end