Module: OnlyofficeDocumentserverTestingFramework::UpdateLinksHelper

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

Overview

Helper to handle files with external links

Instance Method Summary collapse

Instance Method Details

Handle update links dialog



22
23
24
25
26
27
28
29
30
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/update_links_helper.rb', line 22

def handle_update_links_message(to_update)
  return unless selenium_functions(:element_visible?, update_links_message_xpath)

  if to_update
    selenium_functions(:click_on_locator, xpath_update_button, true)
  else
    selenium_functions(:click_on_locator, xpath_do_not_update_button, true)
  end
end

Returns xpath of update links message.

Returns:

  • (String)

    xpath of update links message



7
8
9
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/update_links_helper.rb', line 7

def update_links_message_xpath
  '//span[contains(text(), "This workbook contains links to")]'
end

#xpath_do_not_update_buttonString

Returns xpath of don’t update button.

Returns:

  • (String)

    xpath of don’t update button



17
18
19
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/update_links_helper.rb', line 17

def xpath_do_not_update_button
  "#{update_links_message_xpath}/../../../..//button[@result='cancel']"
end

#xpath_update_buttonString

Returns xpath of update button.

Returns:

  • (String)

    xpath of update button



12
13
14
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/management/update_links_helper.rb', line 12

def xpath_update_button
  "#{update_links_message_xpath}/../../../..//button[@result='ok']"
end