Module: Appom
- Defined in:
- lib/appom.rb,
lib/appom/page.rb,
lib/appom/wait.rb,
lib/appom/section.rb,
lib/appom/version.rb,
lib/appom/element_finder.rb,
lib/appom/element_container.rb
Defined Under Namespace
Modules: ElementContainer, ElementFinder Classes: ElementsDefineNoTextError, ElementsEmptyError, ElementsTextVerifyError, InvalidElementError, NoSuchElementError, Page, Section, TimeoutError, UnsupportedBlockError, Wait
Constant Summary collapse
- VERSION =
'1.3.2'.freeze
Class Attribute Summary collapse
-
.driver ⇒ Object
Returns the value of attribute driver.
-
.max_wait_time ⇒ Object
Returns the value of attribute max_wait_time.
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
Configure appom.
-
.register_driver ⇒ Appium::Driver
Register a new appium driver for Appom.
-
.reset_driver ⇒ Object
Reset the device, relaunching the application.
-
.setup_exit_handler ⇒ Object
After run all scenario and exit we will quit driver to close application under test.
-
.start_driver ⇒ Object
Creates a new global driver and quits the old one if it exists.
Class Attribute Details
.driver ⇒ Object
Returns the value of attribute driver.
31 32 33 |
# File 'lib/appom.rb', line 31 def driver @driver end |
.max_wait_time ⇒ Object
Returns the value of attribute max_wait_time.
32 33 34 |
# File 'lib/appom.rb', line 32 def max_wait_time @max_wait_time end |
Class Method Details
.configure {|_self| ... } ⇒ Object
Configure appom
35 36 37 |
# File 'lib/appom.rb', line 35 def configure yield self end |
.register_driver ⇒ Appium::Driver
Register a new appium driver for Appom.
41 42 43 44 |
# File 'lib/appom.rb', line 41 def register_driver @driver = yield setup_exit_handler end |
.reset_driver ⇒ Object
Reset the device, relaunching the application.
52 53 54 |
# File 'lib/appom.rb', line 52 def reset_driver @driver.reset end |
.setup_exit_handler ⇒ Object
After run all scenario and exit we will quit driver to close application under test
57 58 59 60 61 62 |
# File 'lib/appom.rb', line 57 def setup_exit_handler main = Process.pid at_exit do @driver.driver_quit if Process.pid == main end end |
.start_driver ⇒ Object
Creates a new global driver and quits the old one if it exists.
47 48 49 |
# File 'lib/appom.rb', line 47 def start_driver @driver.start_driver end |