ie_handler 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +31 -43
- data/lib/ie_handler.rb +2 -2
- metadata +7 -7
data/README.rdoc
CHANGED
@@ -9,62 +9,53 @@ It has simple syntax and strong methods.
|
|
9
9
|
Currently we support only IE, but we plan to extend other MS products in the
|
10
10
|
future.
|
11
11
|
|
12
|
-
==
|
12
|
+
== INSTALL:
|
13
|
+
|
14
|
+
* sudo gem install ie_handler
|
15
|
+
|
16
|
+
|
17
|
+
== FEATURES
|
13
18
|
|
14
19
|
require this file and create ie object.
|
15
|
-
|
16
|
-
|
17
|
-
ie = IEPage.new("http://google.com")
|
18
|
-
</pre>
|
20
|
+
require './lib/IEPage'
|
21
|
+
ie = IEPage.new("http://google.com")
|
19
22
|
|
20
23
|
You can access document like DOM.
|
21
24
|
Make sure that you need to call "find" method at the first.
|
22
25
|
The method initialize the current dom object.
|
23
|
-
|
24
|
-
ie.find.
|
25
|
-
ie.find.
|
26
|
-
ie.find.tag("table",2) #=> getElementsByTagName("table").itemn(2)
|
27
|
-
</pre>
|
26
|
+
ie.find.name('Text',0) #=> getElementsByName("Text").item(0)
|
27
|
+
ie.find.id("container") #=> getElementById("container")
|
28
|
+
ie.find.tag("table",2) #=> getElementsByTagName("table").itemn(2)
|
28
29
|
|
29
30
|
We support "Saved Access" which hold the current dom object.
|
30
|
-
|
31
|
-
tr
|
32
|
-
tr.sa.tag('td',
|
33
|
-
|
34
|
-
...
|
35
|
-
</pre>
|
31
|
+
tr = ie.find.tag('table',12).tag('tr',1)
|
32
|
+
tr.sa.tag('td',1)
|
33
|
+
tr.sa.tag('td',2)
|
34
|
+
...
|
36
35
|
|
37
36
|
Other convinient methods.
|
38
|
-
|
39
|
-
ie.
|
40
|
-
ie.
|
41
|
-
ie.
|
42
|
-
ie.
|
43
|
-
ie.
|
44
|
-
ie.id('
|
45
|
-
ie.id('sbmt_btn').click
|
46
|
-
</pre>
|
37
|
+
ie.wait
|
38
|
+
ie.close
|
39
|
+
ie.back
|
40
|
+
ie.go(url)
|
41
|
+
ie.tag('tr').each....
|
42
|
+
ie.id('hoge').html
|
43
|
+
ie.id('sbmt_btn').click
|
47
44
|
|
48
45
|
You can also add some elements.
|
49
|
-
|
50
|
-
div =
|
51
|
-
div.
|
52
|
-
|
53
|
-
ie.id('list').add(div)
|
54
|
-
</pre>
|
46
|
+
div = IEPage.make_elemn(ie, "div")
|
47
|
+
div.value = "test"
|
48
|
+
div.attr("id", "item")
|
49
|
+
ie.id('list').add(div)
|
55
50
|
|
56
51
|
For debugging.
|
57
52
|
methods method output the all of the Win32OLE methods.
|
58
|
-
|
59
|
-
ie.methods
|
60
|
-
ie.
|
61
|
-
ie.method("Click")
|
62
|
-
</pre>
|
53
|
+
ie.methods
|
54
|
+
ie.methods(/^on/)
|
55
|
+
ie.method("Click")
|
63
56
|
|
64
57
|
You can use origin Win32OLE method.
|
65
|
-
|
66
|
-
ie.getElementById(...)
|
67
|
-
</pre>
|
58
|
+
ie.getElementById(...)
|
68
59
|
You can search the methods by using "methods, method" method.
|
69
60
|
|
70
61
|
|
@@ -73,15 +64,12 @@ You can search the methods by using "methods, method" method.
|
|
73
64
|
* Windows Machine
|
74
65
|
* Over Ruby 1.8
|
75
66
|
|
76
|
-
== INSTALL:
|
77
|
-
|
78
|
-
* sudo gem install
|
79
67
|
|
80
68
|
== LICENSE:
|
81
69
|
|
82
70
|
(The MIT License)
|
83
71
|
|
84
|
-
Copyright (c) 2012
|
72
|
+
Copyright (c) 2012 Kiminari Homma
|
85
73
|
|
86
74
|
Permission is hereby granted, free of charge, to any person obtaining
|
87
75
|
a copy of this software and associated documentation files (the
|
data/lib/ie_handler.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ie_handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-06-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|
16
|
-
requirement: &
|
16
|
+
requirement: &77940560 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.10'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *77940560
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: newgem
|
27
|
-
requirement: &
|
27
|
+
requirement: &77940320 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.5.3
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *77940320
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: hoe
|
38
|
-
requirement: &
|
38
|
+
requirement: &77940080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '3.0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *77940080
|
47
47
|
description: ! 'IE Handler enable you to handle IE using Ruby.
|
48
48
|
|
49
49
|
It has simple syntax and strong methods.
|