NittResults 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module NittResults
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/NittResults.rb CHANGED
@@ -16,9 +16,12 @@ module NittResults
16
16
  element.send_keys(rollno)
17
17
  # Fixed the selection thing that exists for even semester results
18
18
  button.click
19
- select = browser.find_element(:id,"Dt1")
20
- select.find_elements(:tag_name, "option").each do |option|
21
- option.click if option.text == "MAY-2012 (REGULAR EXAM)"
19
+ valid_roll_no = browser.find_elements(:id,"Dt1").size
20
+ if valid_roll_no > 0
21
+ select = browser.find_element(:id,"Dt1")
22
+ select.find_elements(:tag_name, "option").each do |option|
23
+ option.click if option.text == "MAY-2012 (REGULAR EXAM)"
24
+ end
22
25
  end
23
26
  #get the data and store it in the database
24
27
  #i'm storing in a text files for now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: NittResults
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: