Module: BasePage
- Included in:
- CreatePage, UpdatePage, ViewPage
- Defined in:
- lib/leap_salesforce_ui/base_page.rb
Instance Method Summary collapse
- #browser ⇒ Watir::Browser
-
#soql_object(soql_object) ⇒ Object
Set entity this page object refers to.
-
#visit(use_record_type: true) ⇒ Object
Visit the current page, logging in if required.
Instance Method Details
#browser ⇒ Watir::Browser
7 8 9 |
# File 'lib/leap_salesforce_ui/base_page.rb', line 7 def browser LeapSalesforce.browser end |
#soql_object(soql_object) ⇒ Object
Set entity this page object refers to
13 14 15 |
# File 'lib/leap_salesforce_ui/base_page.rb', line 13 def soql_object(soql_object) @soql_object = soql_object end |
#visit(use_record_type: true) ⇒ Object
Visit the current page, logging in if required
19 20 21 22 23 24 25 26 |
# File 'lib/leap_salesforce_ui/base_page.rb', line 19 def visit(use_record_type: true) LoginPage.login page_url = "#{SoqlHandler.instance_url}/lightning/o/#{@soql_object.soql_object_name}/new" page_url += '?useRecordTypeCheck=1' if use_record_type LeapSalesforce.logger.info "Visiting #{self}" browser.goto page_url self end |