Class: DocServiceWelcome
- Inherits:
-
Object
- Object
- DocServiceWelcome
- Defined in:
- lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_service_welcome.rb
Overview
Class for describing Welcome page of test example
Instance Method Summary collapse
-
#go_to_example ⇒ Nothing
Go to Test Example.
-
#initialize(instance) ⇒ DocServiceWelcome
constructor
A new instance of DocServiceWelcome.
-
#opened? ⇒ True, False
Is welcome page opened.
-
#wait_load ⇒ Nothing
Waiting for load of page.
Constructor Details
#initialize(instance) ⇒ DocServiceWelcome
Returns a new instance of DocServiceWelcome.
6 7 8 9 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_service_welcome.rb', line 6 def initialize(instance) @instance = instance @xpath_test_example = '//a[contains(@href, "/example")]' end |
Instance Method Details
#go_to_example ⇒ Nothing
Go to Test Example
29 30 31 32 33 34 35 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_service_welcome.rb', line 29 def go_to_example wait_load @instance.selenium.wait_until_element_visible(@xpath_test_example) @instance.selenium.click_on_locator(@xpath_test_example) OnlyofficeLoggerHelper.log('Go to test example') @instance.doc_test_functions.wait_load end |
#opened? ⇒ True, False
Returns is welcome page opened.
21 22 23 24 25 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_service_welcome.rb', line 21 def opened? result = @instance.selenium.element_present?(@xpath_test_example) OnlyofficeLoggerHelper.log("Current server is a Doc Service Welcome: #{result}") result end |
#wait_load ⇒ Nothing
Waiting for load of page
13 14 15 16 17 18 |
# File 'lib/onlyoffice_documentserver_testing_framework/test_instance_docs/doc_service_welcome.rb', line 13 def wait_load @instance.webdriver.wait_until do opened? end sleep 1 # Additional wait for load end |