class Appium::Driver
def absolute_app_path
-
(String)
- APP_PATH as an absolute path
def absolute_app_path raise 'APP_PATH not set!' if @app_path.nil? || @app_path.empty? # Sauce storage API. http://saucelabs.com/docs/rest#storage return @app_path if @app_path.start_with? 'sauce-storage:' return @app_path if @app_path.match(/^http/) # public URL for Sauce if @app_path.match(/^\//) # absolute file path raise "App doesn't exist. #{@app_path}" unless File.exist? @app_path return @app_path end # if it doesn't contain a slash then it's a bundle id return @app_path unless @app_path.match(/[\/\\]/) file = File.join(File.dirname(__FILE__), @app_path) raise "App doesn't exist #{file}" unless File.exist? file file end