Sha256: 8c9a2cad4177e0024b57862b497d659b46b05433a11428d6e6f6c8068f5e2ed2

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

module PowerSchool
    class Teachers

        def self.find( full_name )
            PowerSchool::Connection.go_to 'faculty/search.html'
            PowerSchool.browser.text_field(:id => "ss").set full_name
            PowerSchool.browser.button(:id => "btnSearch").click
            if PowerSchool.browser.frame(:id => "frameContent").exists?
                PowerSchool.browser.frame(:id => "frameContent").div(:id => "content-main").h1.text
            elsif PowerSchool.browser.div(:id => "selectHandpick").exists?
              true
            else
                false
            end
        end

        def self.import(file_path)
            PowerSchool::Connection.quick_import('Teachers', file_path)
        end

        def self.delete(full_name)
            find(full_name)
            PowerSchool.browser.frame(:id => "frameMenu").a(:text => "Security Settings").click 
            PowerSchool.browser.frame(:id => "frameContent").button(:id => "btnConfirmDeleteProxy").click 
            PowerSchool.browser.frame(:id => "frameContent").a(:id => "btnDelete").click 
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
power_school-0.0.4 lib/power_school/teachers.rb
power_school-0.0.3 lib/power_school/teachers.rb
power_school-0.0.2 lib/power_school/teachers.rb