Class: IhealthBot::Endpoints::BloodGlucose

Inherits:
Base
  • Object
show all
Defined in:
lib/ihealth_bot/endpoints/blood_glucose.rb

Constant Summary

Constants inherited from Base

IhealthBot::Endpoints::Base::AUTOCOMPLETE_XPATH, IhealthBot::Endpoints::Base::ENDPOINT_NAVIGATION_XPATH, IhealthBot::Endpoints::Base::ERROR_BOX_XPATH, IhealthBot::Endpoints::Base::LEFT_NAVIGATION_XPATH, IhealthBot::Endpoints::Base::MAIN_NAVIGATION_XPATH

Class Method Summary collapse

Class Method Details

.createObject



4
5
6
7
8
9
10
11
# File 'lib/ihealth_bot/endpoints/blood_glucose.rb', line 4

def self.create
  super('Blood Glucose') do
    find('#txtGlucose').set(rand(50..200))
    find('#selMeal').set(%w{Pre-Breakfast Post-Breakfast Pre-Lunch Post-Lunch Pre-Dinner Post-Dinner Bedtime After Snacks Random}.sample)
    find('#selMedication').set(%w{Pre-Medicine Post-Medicine}.sample)
    find('#txtRemark').set("Via iHealth Bot v#{VERSION}")
  end
end