Class: Appium::Core::Element
- Inherits:
-
Object
- Object
- Appium::Core::Element
- Includes:
- TestaAppiumDriver::Attributes, TestaAppiumDriver::ClassSelectors, TestaAppiumDriver::TypeSelectors
- Defined in:
- lib/testa_appium_driver/ios/selenium_element.rb,
lib/testa_appium_driver/common/selenium_element.rb,
lib/testa_appium_driver/android/selenium_element.rb
Class Method Summary collapse
-
.set_driver(driver, udid) ⇒ Object
sets the testa appium driver instance for the current phone.
Instance Method Summary collapse
-
#get_driver ⇒ TestaAppiumDriver::Driver
Testa appium driver instance for the current phone.
- #parent ⇒ Object
Methods included from TestaAppiumDriver::ClassSelectors
#add_selector, #button, #buttons, #card_view, #card_views, #check_box, #check_boxes, #edit_text, #edit_texts, #element, #elements, #frame_layout, #frame_layouts, #horizontal_scroll_view, #horizontal_scroll_views, #image_button, #image_buttons, #image_view, #image_views, #linear_layout, #linear_layouts, #list_view, #list_views, #progress_bar, #progress_bars, #radio_button, #radio_buttons, #radio_group, #radio_groups, #recycler_view, #recycler_views, #relative_layout, #relative_layouts, #scroll_view, #scroll_views, #search_view, #search_views, #spinner, #spinners, #switch, #switches, #text_view, #text_views, #toast, #toasts, #toolbar, #toolbars, #view, #view_group, #view_groups, #view_pager, #view_pagers, #views, #web_view, #web_views
Methods included from TestaAppiumDriver::Attributes
#accessibility_container, #accessible?, #checkable?, #checked?, #class_name, #clickable?, #desc, #displayed?, #enabled?, #focusable?, #focused?, #frame, #id, #index, #label, #long_clickable?, #name, #package, #password?, #rect, #scrollable?, #selected?, #selection_end, #selection_start, #testa_attribute, #type, #value, #visible?
Methods included from TestaAppiumDriver::TypeSelectors
#add_selector, #button, #buttons, #cell, #cells, #collection_view, #collection_views, #element, #elements, #image, #images, #navigation_bar, #navigation_bars, #other, #others, #scroll_view, #scroll_views, #secure_text_field, #secure_text_fields, #static_text, #static_texts, #table, #tables, #text_field, #text_fields, #window, #windows
Class Method Details
.set_driver(driver, udid) ⇒ Object
sets the testa appium driver instance for the current phone
5 6 7 8 9 |
# File 'lib/testa_appium_driver/common/selenium_element.rb', line 5 def self.set_driver(driver, udid) udid = "unknown" if udid.nil? @@drivers ||= {} @@drivers[udid] = driver end |
Instance Method Details
#get_driver ⇒ TestaAppiumDriver::Driver
Returns testa appium driver instance for the current phone.
12 13 14 15 16 |
# File 'lib/testa_appium_driver/common/selenium_element.rb', line 12 def get_driver udid = @bridge.capabilities.instance_variable_get(:@capabilities)["udid"] udid = "unknown" if udid.nil? @@drivers[udid] end |
#parent ⇒ Object
7 8 9 |
# File 'lib/testa_appium_driver/android/selenium_element.rb', line 7 def parent self.find_element(xpath: "./..") end |