selenium-selenese 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/selenium/client/base.rb +22 -24
  2. metadata +1 -1
@@ -119,6 +119,28 @@ module Selenium
119
119
 
120
120
  #goto method added by Priya
121
121
 
122
+ def exec_selenese_script(file)
123
+ f = File.new(file,"r")
124
+ string = ""
125
+ f.readlines.each { |line|
126
+ line.strip!
127
+ string = string + line.to_s
128
+ }
129
+ str_arr = string.partition("<tbody>")
130
+ str_arr.shift(2)
131
+ arr = str_arr[0].split("</tr>")
132
+ arr.pop
133
+ commands = []
134
+ arr.each{|ele| commands << ele.gsub("<tr><td>","").gsub("</td><td>",",").gsub("</td>","").split(",")}
135
+ @browser = Selenium::Client::Driver.new(:browser=>"*firefox", :timeout_in_second=> 15000, :url => "http://www.google.com")
136
+ @browser.start_new_browser_session
137
+ commands.each do |command|
138
+ args = []
139
+ args << command[1]
140
+ args << command[2]
141
+ @browser.remote_control_command(command[0],args)
142
+ end
143
+ end
122
144
  #def goto(url)
123
145
  # start_new_browser_session
124
146
  # open "/"
@@ -137,28 +159,4 @@ module Selenium
137
159
  end
138
160
 
139
161
  end
140
-
141
- def exec_selenese_script(file)
142
- f = File.new(file,"r")
143
- string = ""
144
- f.readlines.each { |line|
145
- line.strip!
146
- string = string + line.to_s
147
- }
148
- str_arr = string.partition("<tbody>")
149
- str_arr.shift(2)
150
- arr = str_arr[0].split("</tr>")
151
- arr.pop
152
- commands = []
153
- arr.each{|ele| commands << ele.gsub("<tr><td>","").gsub("</td><td>",",").gsub("</td>","").split(",")}
154
- @browser = Selenium::Client::Driver.new(:browser=>"*firefox", :timeout_in_second=> 15000, :url => "http://www.google.com")
155
- @browser.start_new_browser_session
156
- commands.each do |command|
157
- args = []
158
- args << command[1]
159
- args << command[2]
160
- @browser.remote_control_command(command[0],args)
161
- end
162
- end
163
-
164
162
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-selenese
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.11
4
+ version: 1.1.12
5
5
  prerelease: !!null
6
6
  platform: ruby
7
7
  authors: