Class: TestCentricity::AppElements::AppUIElement
- Includes:
- Test::Unit::Assertions
- Defined in:
- lib/testcentricity_apps/app_elements/app_element.rb
Direct Known Subclasses
AppAlert, AppButton, AppCheckBox, AppImage, AppLabel, AppList, AppMenu, AppRadio, AppSelectList, AppSwitch, AppTextField
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#locator ⇒ Object
readonly
Returns the value of attribute locator.
-
#mru_app_session ⇒ Object
Returns the value of attribute mru_app_session.
-
#mru_locator ⇒ Object
Returns the value of attribute mru_locator.
-
#mru_object ⇒ Object
Returns the value of attribute mru_object.
-
#mru_parent ⇒ Object
Returns the value of attribute mru_parent.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #clear ⇒ Object
-
#click ⇒ Object
Click on a UI element.
-
#count ⇒ Integer
Return the number of occurrences of an object with an ambiguous locator that evaluates to multiple UI elements.
-
#disabled? ⇒ Boolean
Is UI object disabled (not enabled)?.
-
#double_tap ⇒ Object
Double-tap on a UI element.
-
#drag_and_drop(target, duration = 0.3) ⇒ Object
Drag the UI object to the specified target object.
-
#drag_by(right_offset, down_offset, duration = 0.3) ⇒ Object
Drag the UI object by the specified offset.
- #element ⇒ Object
-
#enabled? ⇒ Boolean
Is UI object enabled?.
-
#exists? ⇒ Boolean
Does UI object exists?.
- #get_attribute(attrib) ⇒ Object
- #get_caption ⇒ Object (also: #caption)
- #get_locator ⇒ Object
- #get_name ⇒ Object
- #get_object_type ⇒ Object
- #get_value ⇒ Object (also: #value)
-
#height ⇒ Integer
Return height of object.
-
#hidden? ⇒ Boolean
Is UI object hidden (not visible)?.
- #hover ⇒ Object
- #id ⇒ Object
- #identifier ⇒ Object
-
#initialize(name, parent, locator, context) ⇒ AppUIElement
constructor
A new instance of AppUIElement.
-
#long_press(duration = 1) ⇒ Object
Long press on a UI element.
- #reset_mru_cache ⇒ Object
-
#scroll_into_view(scroll_mode = :vertical) ⇒ Object
Scroll the UI object until it is visible.
- #selected? ⇒ Boolean
-
#send_keys(value) ⇒ Object
Send keystrokes to this UI element.
- #set(value) ⇒ Object
-
#swipe_gesture(direction, distance = 0.5) ⇒ Object
Perform a swipe gesture on the UI object in the specified direction.
-
#tap ⇒ Object
Tap on a UI element.
-
#visible? ⇒ Boolean
Is UI object visible?.
-
#wait_until_enabled(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is enabled, or until the specified wait time has expired.
-
#wait_until_exists(seconds = nil, post_exception = true) ⇒ Object
Wait until the object exists, or until the specified wait time has expired.
-
#wait_until_gone(seconds = nil, post_exception = true) ⇒ Object
Wait until the object no longer exists, or until the specified wait time has expired.
-
#wait_until_hidden(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is hidden, or until the specified wait time has expired.
-
#wait_until_value_changes(seconds = nil, post_exception = true) ⇒ Object
Wait until the object's value changes to a different value, or until the specified wait time has expired.
-
#wait_until_value_is(value, seconds = nil, post_exception = true) ⇒ Object
Wait until the object's value equals the specified value, or until the specified wait time has expired.
-
#wait_until_visible(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is visible, or until the specified wait time has expired.
-
#width ⇒ Integer
Return width of object.
-
#x_loc ⇒ Integer
Return x coordinate of object's location.
-
#y_loc ⇒ Integer
Return y coordinate of object's location.
Constructor Details
#initialize(name, parent, locator, context) ⇒ AppUIElement
Returns a new instance of AppUIElement.
19 20 21 22 23 24 25 26 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 19 def initialize(name, parent, locator, context) @name = name @parent = parent @locator = locator @context = context @type = nil reset_mru_cache end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
16 17 18 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 16 def context @context end |
#locator ⇒ Object (readonly)
Returns the value of attribute locator.
16 17 18 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 16 def locator @locator end |
#mru_app_session ⇒ Object
Returns the value of attribute mru_app_session.
17 18 19 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 17 def mru_app_session @mru_app_session end |
#mru_locator ⇒ Object
Returns the value of attribute mru_locator.
17 18 19 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 17 def mru_locator @mru_locator end |
#mru_object ⇒ Object
Returns the value of attribute mru_object.
17 18 19 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 17 def mru_object @mru_object end |
#mru_parent ⇒ Object
Returns the value of attribute mru_parent.
17 18 19 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 17 def mru_parent @mru_parent end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
16 17 18 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 16 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
16 17 18 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 16 def parent @parent end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 16 def type @type end |
Instance Method Details
#clear ⇒ Object
80 81 82 83 84 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 80 def clear obj = element object_not_found_exception(obj) obj.clear end |
#click ⇒ Object
Click on a UI element
455 456 457 458 459 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 455 def click obj = element object_not_found_exception(obj) obj.click end |
#count ⇒ Integer
Return the number of occurrences of an object with an ambiguous locator that evaluates to multiple UI elements.
445 446 447 448 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 445 def count objs = find_elements(@locator.keys[0], @locator.values[0]) objs.count end |
#disabled? ⇒ Boolean
Is UI object disabled (not enabled)?
217 218 219 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 217 def disabled? !enabled? end |
#double_tap ⇒ Object
Double-tap on a UI element
480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 480 def double_tap obj = element object_not_found_exception(obj) driver.action .click_and_hold(obj) .release .pause(duration: 0.2) .click_and_hold(obj) .release .perform end |
#drag_and_drop(target, duration = 0.3) ⇒ Object
Drag the UI object to the specified target object. If the optional duration parameter is not specified, the duration defaults to 0.3 seconds (300 milliseconds).
550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 550 def drag_and_drop(target, duration = 0.3) drag = element object_not_found_exception(drag) drop = target.element drag_x = drag.location.x drag_y = drag.location.y drop_x = drop.location.x drop_y = drop.location.y driver.action .click_and_hold(drag) .move_by(drop_x - drag_x, drop_y - drag_y, duration: duration) .release .perform end |
#drag_by(right_offset, down_offset, duration = 0.3) ⇒ Object
Drag the UI object by the specified offset. If the optional duration parameter is not specified, the duration defaults to 0.3 seconds (300 milliseconds).
532 533 534 535 536 537 538 539 540 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 532 def drag_by(right_offset, down_offset, duration = 0.3) obj = element object_not_found_exception(obj) driver.action .click_and_hold(obj) .move_by(right_offset, down_offset, duration: duration) .release .perform end |
#element ⇒ Object
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 653 def element reset_mru_cache if @mru_app_session != Environ.app_session_id obj = if @context == :section parent_obj = nil parent_locator = @parent.get_locator if @mru_locator == @locator && @mru_parent == parent_locator && !@mru_object.nil? return @mru_object end parent_locator.each do |locators| if locators.keys[0] == :object parent_obj = locators.values[0] break end parent_obj = if parent_obj.nil? find_element(locators.keys[0], locators.values[0]) else parent_obj.find_element(locators.keys[0], locators.values[0]) end end puts "Found parent object '#{@parent.get_name}' - #{@parent.get_locator}" if ENV['DEBUG'] parent_obj.find_element(@locator.keys[0], @locator.values[0]) else return @mru_object if @mru_locator == @locator && !@mru_object.nil? find_element(@locator.keys[0], @locator.values[0]) end puts "Found object '#{@name}' - #{@locator}" if ENV['DEBUG'] @mru_object = obj @mru_locator = @locator @mru_parent = parent_locator @mru_app_session = Environ.app_session_id obj rescue puts "Did not find object '#{@name}' - #{@locator}" if ENV['DEBUG'] nil end |
#enabled? ⇒ Boolean
Is UI object enabled?
205 206 207 208 209 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 205 def enabled? obj = element object_not_found_exception(obj) obj.enabled? end |
#exists? ⇒ Boolean
Does UI object exists?
165 166 167 168 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 165 def exists? obj = element !obj.nil? end |
#get_attribute(attrib) ⇒ Object
227 228 229 230 231 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 227 def get_attribute(attrib) obj = element object_not_found_exception(obj) obj.attribute(attrib) end |
#get_caption ⇒ Object Also known as:
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 107 def obj = element object_not_found_exception(obj) if Environ.is_macos? return obj.title elsif AppiumConnect.is_webview? = case obj.tag_name.downcase when 'input', 'select', 'textarea' obj.value else obj.text end elsif Environ.is_ios? = case obj.tag_name when 'XCUIElementTypeNavigationBar' obj.attribute(:name) else obj.attribute(:label) end = '' if .nil? else = obj.text if .blank? case obj.attribute(:class) when 'android.view.ViewGroup' = obj.find_element(:xpath, '//android.widget.TextView') = .text when 'android.widget.Button' = obj.find_element(:xpath, '//android.widget.TextView') = .text if .blank? = obj.find_element(:xpath, '//android.widget.ViewGroup/android.widget.TextView') = .text end end end end end |
#get_locator ⇒ Object
39 40 41 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 39 def get_locator @locator end |
#get_name ⇒ Object
43 44 45 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 43 def get_name @name end |
#get_object_type ⇒ Object
35 36 37 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 35 def get_object_type @type end |
#get_value ⇒ Object Also known as: value
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 86 def get_value obj = element object_not_found_exception(obj) if Environ.is_macos? value = obj.value value = obj.title if value.nil? return value elsif AppiumConnect.is_webview? case obj.tag_name.downcase when 'input', 'select', 'textarea' obj.value else obj.text end else obj.text end end |
#height ⇒ Integer
Return height of object.
409 410 411 412 413 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 409 def height obj = element object_not_found_exception(obj) obj.size.height end |
#hidden? ⇒ Boolean
Is UI object hidden (not visible)?
195 196 197 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 195 def hidden? !visible? end |
#hover ⇒ Object
517 518 519 520 521 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 517 def hover obj = element object_not_found_exception(obj) Environ.appium_driver.execute_script('macos: hover', { elementId: obj.id }) end |
#id ⇒ Object
47 48 49 50 51 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 47 def id obj = element object_not_found_exception(obj) obj.id end |
#identifier ⇒ Object
149 150 151 152 153 154 155 156 157 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 149 def identifier if Environ.is_macos? obj = element object_not_found_exception(obj) obj.identifier else raise 'identifier is not a supported attribute' end end |
#long_press(duration = 1) ⇒ Object
Long press on a UI element
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 498 def long_press(duration = 1) obj = element object_not_found_exception(obj) if Environ.is_ios? begin Environ.appium_driver.execute_script('mobile: touchAndHold', { elementId: obj.id, duration: duration }) rescue => err puts "Retrying longpress due to error: #{err}" else return end end driver.action .click_and_hold(obj) .pause(duration: duration) .release .perform end |
#reset_mru_cache ⇒ Object
28 29 30 31 32 33 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 28 def reset_mru_cache @mru_object = nil @mru_locator = nil @mru_parent = nil @mru_app_session = nil end |
#scroll_into_view(scroll_mode = :vertical) ⇒ Object
Scroll the UI object until it is visible. If scroll_mode is not specified, then vertical scrolling will be used.
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 571 def scroll_into_view(scroll_mode = :vertical) return if visible? case scroll_mode when :vertical start_direction = :down end_direction = :up when :horizontal start_direction = :right end_direction = :left else raise "#{scroll_mode} is not a valid selector" end try_count = 8 direction = start_direction while hidden? ScreenManager.current_screen.swipe_gesture(direction, distance = 0.1) try_count -= 1 if try_count.zero? if direction == end_direction break else direction = end_direction try_count = 8 end end end end |
#selected? ⇒ Boolean
221 222 223 224 225 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 221 def selected? obj = element object_not_found_exception(obj) obj.selected? end |
#send_keys(value) ⇒ Object
Send keystrokes to this UI element.
74 75 76 77 78 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 74 def send_keys(value) obj = element object_not_found_exception(obj) obj.send_keys(value) end |
#set(value) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 53 def set(value) obj = element object_not_found_exception(obj) if value.is_a?(Array) obj.send_keys(value[0]) if value[1].is_a?(Integer) press_keycode(value[1]) else obj.send_keys(value[1]) end elsif value.is_a?(String) obj.send_keys(value) end end |
#swipe_gesture(direction, distance = 0.5) ⇒ Object
Perform a swipe gesture on the UI object in the specified direction. The swipe start point is the center of the UI object, and the swipe end point is the distance specified.
A distance of 1 specifies a swipe gesture with a distance that is the full screen height (vertical swipe), or full screen width (horizontal swipe). A distance of 0.5 specifies a swipe gesture with a distance that is half the screen width or height.
If distance is a value less than zero, then the distance of the swipe gesture will be half the height (vertical) or width (horizontal) of the UI element being swiped. This is useful for preforming swipes/scrolls in vertical or horizontal list objects.
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 615 def swipe_gesture(direction, distance = 0.5) raise 'Scroll distance must be less than 1' if distance > 1 obj = element object_not_found_exception(obj) start_pt = [(obj.location.x + (obj.size.width * 0.5)).to_i, (obj.location.y + (obj.size.height * 0.5)).to_i] if distance < 0 top = (start_pt[1] - obj.size.height).to_i bottom = (start_pt[1] + obj.size.height).to_i left = (start_pt[0] - obj.size.width).to_i right = (start_pt[0] + obj.size.width).to_i else screen_size = window_size top = (start_pt[1] - ((screen_size.height * distance) * 0.5)).to_i bottom = (start_pt[1] + ((screen_size.height * distance) * 0.5)).to_i left = (start_pt[0] - ((screen_size.width * distance) * 0.5)).to_i right = (start_pt[0] + ((screen_size.width * distance) * 0.5)).to_i end end_pt = case direction when :up [start_pt[0], bottom] when :down [start_pt[0], top] when :left [right, start_pt[1]] when :right [left, start_pt[1]] end puts "Swipe start_pt = #{start_pt} / end_pt = #{end_pt}" if ENV['DEBUG'] driver.action .click_and_hold(obj) .move_to_location(end_pt[0], end_pt[1], duration: 0.25) .pointer_up .perform end |
#tap ⇒ Object
Tap on a UI element
466 467 468 469 470 471 472 473 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 466 def tap obj = element object_not_found_exception(obj) driver.action .click_and_hold(obj) .release .perform end |
#visible? ⇒ Boolean
Is UI object visible?
176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 176 def visible? obj = element return false if obj.nil? begin obj.displayed? rescue reset_mru_cache obj = element return false if obj.nil? obj.displayed? end end |
#wait_until_enabled(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is enabled, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 328 def wait_until_enabled(seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache enabled? end rescue if post_exception raise "UI #{} remained disabled after #{timeout} seconds" unless enabled? else enabled? end end |
#wait_until_exists(seconds = nil, post_exception = true) ⇒ Object
Wait until the object exists, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 240 def wait_until_exists(seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache exists? end rescue if post_exception raise "Could not find UI #{} after #{timeout} seconds" unless exists? else exists? end end |
#wait_until_gone(seconds = nil, post_exception = true) ⇒ Object
Wait until the object no longer exists, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 262 def wait_until_gone(seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache !exists? end rescue if post_exception raise "UI #{} remained visible after #{timeout} seconds" if exists? else exists? end end |
#wait_until_hidden(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is hidden, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
306 307 308 309 310 311 312 313 314 315 316 317 318 319 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 306 def wait_until_hidden(seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache hidden? end rescue if post_exception raise "UI #{} remained visible after #{timeout} seconds" if visible? else hidden? end end |
#wait_until_value_changes(seconds = nil, post_exception = true) ⇒ Object
Wait until the object's value changes to a different value, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 375 def wait_until_value_changes(seconds = nil, post_exception = true) value = get_value timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache get_value != value end rescue if post_exception raise "Value of UI #{} failed to change from '#{value}' after #{timeout} seconds" if get_value == value else get_value == value end end |
#wait_until_value_is(value, seconds = nil, post_exception = true) ⇒ Object
Wait until the object's value equals the specified value, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 353 def wait_until_value_is(value, seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache compare(value, get_value) end rescue if post_exception raise "Value of UI #{} failed to equal '#{value}' after #{timeout} seconds" unless get_value == value else get_value == value end end |
#wait_until_visible(seconds = nil, post_exception = true) ⇒ Object
Wait until the object is visible, or until the specified wait time has expired. If the wait time is nil, then the wait time will be Environ.default_max_wait_time.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 284 def wait_until_visible(seconds = nil, post_exception = true) timeout = seconds.nil? ? Environ.default_max_wait_time : seconds wait = Selenium::WebDriver::Wait.new(timeout: timeout) wait.until do reset_mru_cache visible? end rescue if post_exception raise "Could not find UI #{} after #{timeout} seconds" unless visible? else visible? end end |
#width ⇒ Integer
Return width of object.
397 398 399 400 401 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 397 def width obj = element object_not_found_exception(obj) obj.size.width end |
#x_loc ⇒ Integer
Return x coordinate of object's location.
421 422 423 424 425 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 421 def x_loc obj = element object_not_found_exception(obj) obj.location.x end |
#y_loc ⇒ Integer
Return y coordinate of object's location.
433 434 435 436 437 |
# File 'lib/testcentricity_apps/app_elements/app_element.rb', line 433 def y_loc obj = element object_not_found_exception(obj) obj.location.y end |