Class: OnlyofficeDocumentserverTestingFramework::TopToolbarUsers
- Inherits:
-
Object
- Object
- OnlyofficeDocumentserverTestingFramework::TopToolbarUsers
- Includes:
- SeleniumWrapper
- Defined in:
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/top_toolbar_users.rb
Overview
Class for getting info about share and users
Instance Method Summary collapse
-
#count ⇒ Integer
Count of users.
-
#initialize(instance) ⇒ TopToolbarUsers
constructor
A new instance of TopToolbarUsers.
-
#present? ⇒ True, False
Is button present.
Methods included from SeleniumWrapper
#button_disabled?, #button_menu_active?, #button_menu_open?, #button_pressed?, #click_on_button, #click_on_displayed_button, #click_on_of_several_by_display_button, #frame_count_addition, #get_attribute, #line_checked?, #line_enabled?, #menu_disabled?, #remove_element, #select_frame, #selenium_functions, #visible?
Methods included from SeleniumWrapperJsErrors
#console_errors, #error_ignored?, #fail_if_console_error, #ignored_errors
Constructor Details
#initialize(instance) ⇒ TopToolbarUsers
Returns a new instance of TopToolbarUsers.
9 10 11 12 13 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/top_toolbar_users.rb', line 9 def initialize(instance) @instance = instance @xpath_button = '//*[@id="tlb-box-users"]' @xpath_count = "#{@xpath_button}/div/label" end |
Instance Method Details
#count ⇒ Integer
Returns count of users.
23 24 25 26 27 28 29 30 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/top_toolbar_users.rb', line 23 def count return 1 unless present? count = selenium_functions(:get_text, @xpath_count) count = 1 if count == '+' OnlyofficeLoggerHelper.log("User count: #{count}") count.to_i end |
#present? ⇒ True, False
Returns is button present.
16 17 18 19 20 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_editor/doc_editor_top_toolbar/top_toolbar_users.rb', line 16 def present? visible = visible?(@xpath_button) OnlyofficeLoggerHelper.log("Button present: #{visible}") visible end |