Skip to content

Commit

Permalink
Add driver method
Browse files Browse the repository at this point in the history
Add screenshot method
Add attr readers
  • Loading branch information
bootstraponline committed Apr 27, 2013
1 parent 6d381fe commit e7f55d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/appium_lib/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ module Appium
class Driver
@@loaded = false

attr_reader :app_path, :app_name, :app_package, :app_activity,
:app_wait_activity, :sauce_username, :sauce_access_key,
:port, :os, :ios_js
def initialize opts={}
opts = {} if opts.nil?
# Path to the .apk, .app or .app.zip.
Expand Down Expand Up @@ -158,6 +161,15 @@ def restart
start_driver
end

# return driver
def driver
@driver
end

def screenshot png_save_path
@driver.save_screenshot png_save_path
end

# Quits the driver
# @return [void]
def driver_quit
Expand Down

0 comments on commit e7f55d9

Please sign in to comment.