hsbc_latest_download 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23d44d8743197b3c812686bb68aae4bbf0d4fb13
4
- data.tar.gz: e8e2429eeb6892a3a2e3545f6d54f85671934087
3
+ metadata.gz: bbc99251af11d472a32a48b71eb131b496687496
4
+ data.tar.gz: d3effa2570c5abdfd6aeb653d7fbc2401652c30d
5
5
  SHA512:
6
- metadata.gz: a8e5b6437d97f751ae25e48efa5734850ff240a8a4827b9066615351326821e4b0689419d57ab239067c24009dbf02008f1232f8d42ef11cfb9201d1bcbd3363
7
- data.tar.gz: 70a6976ae11c43ba8188df895b304396184ed5627323ef3c97ac32856b502a1eb45ba98c22954f327b0cd4e7d7a6b9900283744a91e09b8167f43670b7820488
6
+ metadata.gz: de4094c650632396cc9dd8fd784d3b096c8972e005b536d484369cecaff6014d5288c55aae6151d91e1ac414a8241aca848afab45b40165feed11c897d58c90a
7
+ data.tar.gz: 80da617ec175d9eb4672e693dab5d28a4b73c1cd6649ca0339711ef04e8615bbf4f27d7ce75864e737d66456dcb2473abc9ca3c1813c478416517b3bbb0158d3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -12,6 +12,8 @@ module HsbcLatestDownload
12
12
  driver = Selenium::WebDriver.for :chrome
13
13
  driver.navigate.to HSBC_URL
14
14
 
15
+ wait = Selenium::WebDriver::Wait.new(:timeout => 10)
16
+
15
17
  driver.find_element(partial_link_text: 'Log on').click
16
18
 
17
19
  element = driver.find_element(:name, 'userid')
@@ -32,19 +34,18 @@ module HsbcLatestDownload
32
34
 
33
35
  driver.find_element(class: 'submit_input').click
34
36
 
35
- driver.find_element(:link_text, @options[:account_name]).click
36
- driver.find_element(:link_text, 'Download transactions').click
37
+ wait.until { driver.find_element(:partial_link_text => @options[:account_name]) }
38
+ sleep 1
39
+ driver.find_element(:partial_link_text, @options[:account_name]).click
37
40
 
38
- wait = Selenium::WebDriver::Wait.new(:timeout => 10)
39
- wait.until { driver.find_element(:name => 'downloadType') }
41
+ wait.until { driver.find_element(:partial_link_text => 'Download') }
42
+ driver.find_element(:partial_link_text, 'Download').click
40
43
 
41
- file_type = driver.find_element(:name, 'downloadType')
42
- file_type.find_elements( :tag_name => "option" ).find do |option|
43
- option.text == 'Money 98 onwards (OFX)'
44
- end.click
44
+ within_modal = "//div[contains(concat(' ',normalize-space(@class),' '),' dijitDialogFixed ')]"
45
+ wait.until { driver.find_element(:xpath => "#{within_modal}//input[@value='ofx']") }
46
+ driver.find_element(:xpath, "#{within_modal}//input[@value='ofx']").click
45
47
 
46
- driver.find_element(:link_text, 'Continue').click
47
- driver.find_element(:link_text, 'Confirm').click
48
+ driver.find_element(:xpath, "#{within_modal}//button[@data-dojo-attach-point='dapDownloadBtn']").click
48
49
 
49
50
  sleep 10
50
51
 
@@ -1,3 +1,3 @@
1
1
  module HsbcLatestDownload
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hsbc_latest_download
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Fawcett
@@ -31,7 +31,7 @@ cert_chain:
31
31
  yJIQ7BnT75VQEqtWMfkSjOW64AVlWuD/LU/4NQykWZrh6sAaxKvhYBU/PiujaXyL
32
32
  rUw5QSvC1QClur/I5qvjk8o8/hbxgQuoy5zjq8/vPBuaVDJY
33
33
  -----END CERTIFICATE-----
34
- date: 2016-08-03 00:00:00.000000000 Z
34
+ date: 2016-09-27 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: selenium-webdriver
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.4.5.1
119
+ rubygems_version: 2.5.1
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Download latest hsbc transactions as OFX
metadata.gz.sig CHANGED
Binary file