lib/power_school/students.rb in power_school-0.0.2 vs lib/power_school/students.rb in power_school-0.0.3

- old
+ new

@@ -13,7 +13,27 @@ end def self.import(file_path) PowerSchool::Connection.quick_import('Students', file_path) end + + def self.list_array( fields = ["Student_Number", "LastFirst", "Grade_Level"], css = "#content-main .box-round table tr", enroll_status = "Active" ) + case enroll_status + when "Active" + PowerSchool::Connection.go_home("?selectstudent=") + when "Pre-registered" + PowerSchool::Connection.go_home("?selectstudent=/enroll_status=-1") + end + PowerSchool::Connection.go_to("studentlist/studentlist1.html") + + PowerSchool::Connection.clear_form + + fields.each_with_index do |field, index| + index = index + 1 + PowerSchool.browser.text_field(:id => "tt"+index.to_s).set (field) + end + PowerSchool.browser.button(:id => "btnSubmit").click + student_array = PowerSchool.table_to_a( PowerSchool.browser.html, css) + end + end end