Class: RUTL::Interface::Notepad

Inherits:
WindowsApp show all
Defined in:
lib/rutl/interface/windows/notepad.rb

Overview

Notepad.

Constant Summary

Constants included from Waiter

Waiter::DEFAULT_TIMEOUT, Waiter::POLL_SLEEP_TIME

Instance Attribute Summary

Attributes inherited from Base

#camera, #driver, #views

Instance Method Summary collapse

Methods inherited from WindowsApp

#base_opts, #kill, #open?, #quit

Methods inherited from Base

#find_state, #find_view, #goto, #method_missing, #quit, #respond_to_missing?, #wait_for_transition

Methods included from Waiter

#await

Methods included from CheckView

#view?

Constructor Details

#initializeNotepad

Returns a new instance of Notepad.



10
11
12
13
14
15
16
17
# File 'lib/rutl/interface/windows/notepad.rb', line 10

def initialize
  @app_name = 'notepad.exe'
  driver_opts = base_opts
  driver_opts[:caps][:app] = 'C:\Windows\System32\notepad.exe'
  @driver = Appium::Driver.new(driver_opts, false)
  @driver.start
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RUTL::Interface::Base

Instance Method Details

#current_viewObject



19
20
21
22
23
# File 'lib/rutl/interface/windows/notepad.rb', line 19

def current_view
  # This only works because I only have one view.
  # Should I? What about dialogs?
  @views.first
end