Module: OnlyofficeDocumentserverTestingFramework::ManagerMessagesChecker

Included in:
Management
Defined in:
lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/manager_messages_checker.rb

Overview

Check different messages of document load

Instance Method Summary collapse

Instance Method Details

#file_not_found_message?Boolean

Returns is ‘File not found` message shown.

Returns:

  • (Boolean)

    is ‘File not found` message shown



16
17
18
19
20
21
22
23
24
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/manager_messages_checker.rb', line 16

def file_not_found_message?
  message_xpath = '//div[contains(@class, "tooltip-inner") and ' \
                  'contains(text(),"The required file was not found")]'
  @instance.selenium.select_frame
  error_on_loading = @instance.selenium.element_visible?(message_xpath)
  @instance.selenium.select_top_frame
  OnlyofficeLoggerHelper.log("file_not_found_message is shown: #{error_on_loading}")
  error_on_loading
end

#permission_denied_message?Boolean

Returns is permission denied message shown.

Returns:

  • (Boolean)

    is permission denied message shown



7
8
9
10
11
12
13
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/manager_messages_checker.rb', line 7

def permission_denied_message?
  denied_xpath = '//div[contains(text(),"You don\'t have enough permission to view the file")]'
  @instance.selenium.select_frame
  error_on_loading = @instance.selenium.element_present?(denied_xpath)
  @instance.selenium.select_top_frame
  error_on_loading
end