teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

質問の内容不足を訂正しました。

2018/11/19 05:52

投稿

rgon
rgon

スコア9

title CHANGED
File without changes
body CHANGED
@@ -4,17 +4,37 @@
4
4
 
5
5
 
6
6
  ### 発生している問題・エラーメッセージ
7
+ ```HTML
8
+ <input class="ui-button ui-widget ui-state-default ui-corner-all" id="button1"
9
+ role="button" aria-disabled="false" onclick="return callOutPut();" type="button" value="ダウンロード">
10
+ ```
7
11
 
8
- <input class="ui-button ui-widget ui-state-default ui-corner-all" id="button1" role="button" aria-disabled="false" onclick="return callOutPut();" type="button" value="ダウンロード">
9
12
 
13
+
10
14
  このダウンロードボタンを押したいのです。
11
15
 
12
16
  ログイン画面のログインボタンと同様に試したのですが
13
17
  上手くいきません。
14
18
 
15
- javaScriptを呼び出せば良いのでしょうか。
19
+ ```HTML
20
+ <button tabindex="3" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
21
+ role="button" aria-disabled="false" type="submit"><span class="ui-button-text">ログイン</span></button>
22
+ ```
16
23
 
24
+ これに対して
25
+ ```VBA
26
+ For Each obj In ieDoc.getElementsByTagName("span")
27
+ If obj.innerText = "ログイン" Then
28
+ obj.Click
29
+ Exit For
30
+ End If
31
+ Next
32
+ ```
33
+ このようにログインしました。
17
34
 
35
+ 同様にダウンロードしたく試行錯誤したのですが
36
+ 上手くいきませんでした。
37
+
18
38
  Excel2016を使用しています。
19
39
 
20
40
  よろしくお願いします。