Class: IOS

Inherits:
Base show all
Defined in:
lib/skeleton/ios.rb

Constant Summary collapse

ACC_ID =
{
  java: :AccessibilityId,
  ruby: :accessibility_id
}
NSPREDICATE =
{
  java: :iOSNsPredicateString,
  ruby: :predicate
}
IDENTIFIER =
'identifier'
LABEL =
'label'
XCRESULTS_FOLDER =
"#{ROOT_DIR}/XCResults"
XCODEPROJ_FOLDER =
"#{ROOT_DIR}/xcodeproj"

Constants inherited from Base

Base::ATTACHMENTS_FOLDER, Base::PAGE_OBJECTS_FOLDER, Base::ROOT_DIR, Base::TIMESTAMP

Constants included from Language

Language::JAVA, Language::PYTHON, Language::RUBY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#log, #precondition

Methods included from Language

#java, #ruby

Constructor Details

#initialize(options) ⇒ IOS

Returns a new instance of IOS.



17
18
19
20
21
# File 'lib/skeleton/ios.rb', line 17

def initialize(options)
  self.platform = options.platform
  self.udid = options.udid
  self.bundle_id = options.bundle
end

Instance Attribute Details

#bundle_idObject

Returns the value of attribute bundle_id.



15
16
17
# File 'lib/skeleton/ios.rb', line 15

def bundle_id
  @bundle_id
end

#platformObject

Returns the value of attribute platform.



15
16
17
# File 'lib/skeleton/ios.rb', line 15

def platform
  @platform
end

#udidObject

Returns the value of attribute udid.



15
16
17
# File 'lib/skeleton/ios.rb', line 15

def udid
  @udid
end

Instance Method Details

#skeletonerObject



23
24
25
26
27
28
29
30
31
# File 'lib/skeleton/ios.rb', line 23

def skeletoner
  log.info('We starting to skeleton your screen 🚀')
  check_udid
  page_source
  create_page_objects
  save_screenshot
  save(page_source)
  log.info('We successfully skeletoned your screen 👻')
end